Query subchannels by user
Query the subchannels where a user is on the private subchannel member list, with pagination. Returns subchannel IDs.
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:
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The community channel ID. |
userId | String | Yes | The user ID. |
page | Number | No | Page number. Starts at 1. Defaults to 1. |
pageSize | Number | No | Items per page. Defaults to 10. Maximum 50. |
Request example
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:
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
result.subChannels | String[] | List of subchannel IDs. |
Response example
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0,
"result": {
"subChannels": ["busChannel1", "busChannel2"]
}
}