Skip to main content

Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Query user subscriptions

Query a user's subscription relationships.

Request method

POST: https://Base URL/user/subscribe/query.json

Signature required: All server API requests require signature verification. See API request signature.

Rate limit: 100 requests per second

Request body

The request body is in application/x-www-form-urlencoded format and supports the following form parameters:

ParameterTypeRequiredDescription
subTypeIntNoDefaults to 1 (status subscription).
userIdStringYesThe subscriber's user ID.
pageTokenStringNoPagination token. Empty for the first page. Use the pageToken from the previous response for subsequent pages.
pageSizeIntNoItems per page. Defaults to 200. Range: 50–200.

Request example

HTTP
POST /user/subscribe/query.json HTTP/1.1
Host: api-cn.ronghub.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/x-www-form-urlencoded

userId=uid1

Response

FieldTypeDescription
codeIntStatus code. 200 indicates success.
hasNextbooleanWhether there is a next page.
subscriptionsArrayList of subscription records.
pageTokenStringPagination token for the next page.

Subscription record structure:

FieldTypeDescription
subUserIdsString[]Subscribed user IDs.
subTypeIntSubscription type.
subTimeLongSubscription time.
expiryLongSubscription duration.

Error codes

CodeHTTP StatusDescription
200200Success
26001400Invalid request parameters
26003500Internal error
26022403Subscriber limit exceeded
26021200Subscribed user limit reached
26020401Subscription feature not enabled

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
"code": 200,
"hasNext": false,
"pageToken": "1712909941322_2_3881222167",
"subscriptions": [
{
"subUserIds": [
"4",
"5"
],
"subType": 1,
"subTime": 1712909941322,
"expiry": 1000000
}
]
}