Skip to main content

Get open channel info

Retrieve basic information about an open channel, including ID, creation time, participant count, auto-destroy type, and freeze status.

Request

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

Rate limit: 100 per second

Signature: Required. See API request signature.

Request body

Content type: application/json

ParameterTypeRequiredDescription
channelIdStringYesThe open channel ID.

Request example

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

{
"channelId": "gid1"
}

Response

FieldTypeDescription
codeNumberReturn code. 0 indicates success. 23410: open channel does not exist.
resultObjectResult data.
result.channelIdStringOpen channel ID.
result.createdAtNumberCreation timestamp.
result.participantCountNumberCurrent number of participants.
result.destroyTypeNumberAuto-destroy type. 0: destroy on inactivity (default). 1: destroy on schedule.
result.ttlMinutesNumberDestruction time in minutes. When destroyType is 0, this is the inactivity duration. When destroyType is 1, this is the time-to-live after creation. Range: 60–10,080 (7 days).
result.isFrozenBooleanWhether the open channel is frozen. Default: false.

Response example

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

{"code":0,"result":{"channelId":"chatroom001","createdAt":1694777649942,"participantCount":0,"destroyType":1,"ttlMinutes":120,"isFrozen":true}}