Gigya Job Openings

comments.getUserComments REST

Skip to end of metadata
Go to start of metadata


This API retrieves the comments made by a specific user.


Request URL

Where <Data_Center> is:
  • - For the US data center.
  • - For the European data center.
  • - For the Australian data center.
  • - For the Russian data center.
  • - For the Chinese data center.

If you are not sure of your site's data center, see Finding Your Data Center.



senderUIDstringThe unique ID of the user whose comments are to be retrieved. See User.UID for more information.
categoryIDstringThe identifier of the comments category by which to filter the retrieved comments. This parameter is required if using streamID.

The identifier of the comments stream by which to filter the retrieved comments.

*  If using a streamID you must also supply a categoryID, otherwise it will be ignored.

includeNoteBooleanIndicates whether to add the note custom object to the response. 
includeRepliesBooleanIndicates whether to include comment replies in the response.
includeStreamInfoBooleanThis parameter specifies whether to include a stream information object in the response. The default is 'false '. When set to 'true' the response to the method will include the StreamInfo object.
includeUIDBooleanIndicates whether the UID of the commenter will be included in the returned object per comment. The default value is 'false'.
limitintegerThe maximum number of comments to retrieve. The default value is 10.
sortstringThe comments may be sorted in one of the following orders:
  • "dateDesc" - (default) The first comment is the latest one. The comments are sorted by the timestamp of the root comment.
  • "votesDesc" - The first comment is the one that has the highest votes. The comments are sorted by the overall votes value (positive votes minus negative votes) of the root comment in each thread.
startstringDefines what should be the starting point of the comments to retrieve. The purpose of this parameter is pagination of the comments. Use the limit parameter to define how many comments per page. For the first page don't set the start parameter. The response includes a next field, which is a pointer to the starting point of the next page. Set the start parameter with the value of the next field received in the response of the previous getUserComments request.
tagstringThe tag by which to filter the retrieved comments.

Authorization Parameters

Each REST API request must contain identification and authorization parameters.

Some REST APIs may function without these authorization parameters, however, when that occurs, these calls are treated as client-side calls and all client-side rate limits will apply. In order to not reach client-side IP rate limits that may impact your implementation when using server-to-server REST calls, it is Recommended Best Practice to always sign the request or use a secret. A non-exhaustive list of REST APIs that this may apply to are as follows:

  • accounts.login
  • socialize.login
  • accounts.notifyLogin
  • socialize.notifyLogin
  • accounts.finalizeRegistration
  • accounts.linkAccounts

Please refer to the Authorization Parameters section for details. 

Sample Requests



Response Data

errorCode integer The result code of the operation. Code '0' indicates success, any other number indicates failure. For a complete list of error codes, see the Error Codes table.
errorMessage string A short textual description of an error, associated with the errorCode, for logging purposes. This field will appear in the response only in case of an error.
errorDetails string This field will appear in the response only in case of an error and will contain the exception info, if available.
fullEventName string The full name of the event that triggered the response. This is an internally used parameter that is not always returned and should not be relied upon by your implementation.
callId string Unique identifier of the transaction, for debugging purposes.
time string The time of the response represented in ISO 8601 format, i.e., yyyy-mm-dd-Thh:MM:ss.SSSZ or
statusCode integer The HTTP response code of the operation. Code '200' indicates success.
This property is deprecated and only returned for backward compatibility.
statusReason string A brief explanation of the status code.
This property is deprecated and only returned for backward compatibility.


commentsArray of
Comment objects

An array listing the comments. Each comment is represented by a JSON Comment object. In addition to the regular fields of the Comment object, the following fields are returned in the response of this method:

  • categoryID - the category ID of the retrieved comment
  • streamID the stream ID of the retrieved comment
commentCountintegerThe number of returned comments.
nextstringA pointer to the starting point of the next comments page. The purpose of this field is pagination of the comments. Use this field as the value of the 'start' parameter of the next getUserComments request, thus retrieving the next comments and avoid retrieving the same comments again.
hasMoreBooleanSpecifies whether there are more comments that were not returned within this response.

A field that does not contain data will not appear in the response.


Response Example

  "commentCount": 2,
  "next": "ts_1331926917087",
  "nextTS": 1331926917087,
  "hasMore": true,
  "statusCode": 200,
  "errorCode": 0,
  "statusReason": "OK",
  "callId": "ab395ff77b004bcfaa4bc3b10ff9b1fb",
  "time": "2015-03-22T11:42:25.943Z",
  "context": "R1336578465557_0.765838282648474",
  "comments": [
      "ID": "99cce7d4c81546618f32abb2b46019fa",
      "categoryId": "Comments_1",
      "streamId": "Comments_1_stream_1",
      "threadID": "",
      "commentText": "Hello World",
      "sender": {
        "photoURL": "",
        "profileURL": "",
        "loginProvider": "Facebook",
        "name": "Don Marmur",
        "isSelf": true
      "posVotes": 1,
      "vote": "pos",
      "flagCount": 0,
      "timestamp": 1336047222880,
      "threadTimestamp": 1336047222880,
      "status": "published"
      "ID": "e2def104e8684d95aa441576658f8c87",
      "categoryId": "Comments_1",
      "streamId": "Comments_1_stream_1",
      "threadID": "",
      "commentText": "Welcome!",
      "sender": {
        "photoURL": "",
        "profileURL": "",
        "loginProvider": "Facebook",
        "name": "Don Marmur",
        "isSelf": true
      "vote": "none",
      "flagCount": 0,
      "timestamp": 1335877340723,
      "threadTimestamp": 1335877340723,
      "status": "published"