Skip to main content

Query subchannels by user

Query the subchannels where a user is on the private subchannel member list, with pagination. Returns subchannel IDs.

tip

The returned subchannel IDs may not all be private subchannels. Both public and private subchannels can have private member lists. The member list is only enforced when the subchannel type is private. To get a list of private subchannels only, you may need to filter out public subchannels from the results.

Request method

POST: https://Base URL/v4/community-channel/user/subchannel/list

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
channelIdStringYesThe community channel ID.
userIdStringYesThe user ID.
pageNumberNoPage number. Starts at 1. Defaults to 1.
pageSizeNumberNoItems per page. Defaults to 10. Maximum 50.

Request example

HTTP
POST /v4/community-channel/user/subchannel/list HTTP/1.1
Host: api.sg-light-api.com
App-key: kj8swf7oksq89
Nonce: 1181222303
Signature: 6221193e0ffebc01366da6e4cf8950cf32d274d6
Timestamp: 1668430324
Content-Type: application/json

{
"channelId": "abc",
"userId": "userId",
"page": 1,
"pageSize": 50
}

Response

The response body contains a JSON object with the following structure:

FieldTypeDescription
codeNumberStatus code. 0 indicates success.
result.subChannelsString[]List of subchannel IDs.

Response example

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

{
"code": 0,
"result": {
"subChannels": ["busChannel1", "busChannel2"]
}
}