Skip to main content

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

ParameterTypeRequiredDescription
channelIdStringYesThe open channel ID.
pageSizeNumberNoNumber of participants to return. Maximum: 500.
orderNumberNoSort 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

FieldTypeDescription
codeNumberReturn code. 0 indicates success.
resultObjectResult data.
result.totalNumberTotal number of participants in the open channel.
result.participantsObject[]Array of participants (up to 500).
result.participants[i].participantIdStringParticipant user ID.
result.participants[i].createdAtStringJoin 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"
}
]
}
}