Query blocklist
Query a specified user's blocklist. Blocked users cannot send direct messages to the user.
Request method
POST: https://Base URL/v4/user/blocklist/get
Rate limit: 100 requests per second
Signature required: All server API requests require signature verification. See API request signature.
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
userId | String | Yes | The user ID. |
pageToken | String | No | Pagination token from the previous response's next field. If omitted, returns the first 1,000 users sorted by blocklist addition time in descending order. |
pageSize | Number | No | Items per page. Defaults to 1000. Maximum 1000. |
Request example
HTTP
POST /v4/user/blocklist/get HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: xxxxxxxxxxxxxxxx
Content-Type: application/json
{
"userId": "jlk456j5",
"pageToken": "COIB",
"pageSize": 10
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
result | Object | Response data. |
result.blockedUserIds | String[] | List of blocked user IDs. |
result.next | String | Pagination token for the next page. Present when more pages are available. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0,
"result": {
"next": "CNgB",
"blockedUserIds": [
"uid20",
"uid19",
"uid18",
"uid17",
"uid16",
"uid15",
"uid14",
"uid13",
"uid12",
"uid11"
]
}
}