Skip to main content

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:

ParameterTypeRequiredDescription
userIdStringYesThe user ID.
pageTokenStringNoPagination token from the previous response's next field. If omitted, returns the first 1,000 users sorted by blocklist addition time in descending order.
pageSizeNumberNoItems 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

FieldTypeDescription
codeNumberStatus code. 0 indicates success.
resultObjectResponse data.
result.blockedUserIdsString[]List of blocked user IDs.
result.nextStringPagination 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"
]
}
}