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:
| Parameter | Type | Required | Description |
|---|---|---|---|
subType | Int | No | Defaults to 1 (status subscription). |
userId | String | Yes | The subscriber's user ID. |
pageToken | String | No | Pagination token. Empty for the first page. Use the pageToken from the previous response for subsequent pages. |
pageSize | Int | No | Items 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
| Field | Type | Description |
|---|---|---|
code | Int | Status code. 200 indicates success. |
hasNext | boolean | Whether there is a next page. |
subscriptions | Array | List of subscription records. |
pageToken | String | Pagination token for the next page. |
Subscription record structure:
| Field | Type | Description |
|---|---|---|
subUserIds | String[] | Subscribed user IDs. |
subType | Int | Subscription type. |
subTime | Long | Subscription time. |
expiry | Long | Subscription duration. |
Error codes
| Code | HTTP Status | Description |
|---|---|---|
200 | 200 | Success |
26001 | 400 | Invalid request parameters |
26003 | 500 | Internal error |
26022 | 403 | Subscriber limit exceeded |
26021 | 200 | Subscribed user limit reached |
26020 | 401 | Subscription 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
}
]
}