Skip to main content

Batch check participants

Check whether multiple users are currently in a specific open channel. Up to 1,000 users per request.

tip

Results may be affected by the offline participant auto-exit mechanism. Offline users may be automatically removed under certain conditions.

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/open-channel/participant/exist

Rate limit: 100 per second

Signature: Required. See API request signature.

Request body

Content type: application/json

ParameterTypeRequiredDescription
channelIdStringYesThe open channel ID.
participantIdsString[]YesUser IDs to check.

Request example

HTTP
POST /v4/open-channel/participant/exist HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Timestamp: 1408710653491
Nonce: 14314
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"channelId": "10001",
"participantIds": ["y41z2IXBW", "niCtlxnas"]
}

Response

FieldTypeDescription
codeNumberReturn code. 0 indicates success.
resultObjectResult data.
result.participantsObject[]Array of results.
result.participants[i].participantIdStringUser ID.
result.participants[i].isInOpenChannelNumberWhether the user is in the open channel. 1 = yes, 0 = no.

Response example

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

{
"code": 0,
"result": {
"participants": [
{
"participantId": "y41z2IXBW",
"isInOpenChannel": 0
},
{
"participantId": "niCtlxnas",
"isInOpenChannel": 1
}
]
}
}