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
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The open channel ID. |
participantIds | String[] | Yes | User 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
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 0 indicates success. |
result | Object | Result data. |
result.participants | Object[] | Array of results. |
result.participants[i].participantId | String | User ID. |
result.participants[i].isInOpenChannel | Number | Whether 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
}
]
}
}