List participants
Retrieve the participant list for a specific open channel. Returns up to 500 participants, sorted by join time in ascending or descending order.
Request
POST: https://[Base URL](/platform-chat-api/base-url)/v4/open-channel/participant/list
Rate limit: 100 per second
Signature: Required. See API request signature.
Request body
Content type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The open channel ID. |
pageSize | Number | No | Number of participants to return. Maximum: 500. |
order | Number | No | Sort order. 1: ascending by join time. 2: descending by join time. |
Request example
HTTP
POST /v4/open-channel/participant/list HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Timestamp: 1408710653491
Nonce: 14314
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"channelId": "10001",
"pageSize": 2,
"order": 1
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 0 indicates success. |
result | Object | Result data. |
result.total | Number | Total number of participants in the open channel. |
result.participants | Object[] | Array of participants (up to 500). |
result.participants[i].participantId | String | Participant user ID. |
result.participants[i].createdAt | String | Join time, format: YYYY-MM-DD HH:MM:SS. Note: UTC. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0,
"result": {
"total": 500,
"participants": [
{
"participantId": "uid1",
"createdAt": "2015-09-10 16:38:26"
},
{
"participantId": "uid2",
"createdAt": "2015-09-10 16:38:26"
}
]
}
}