List group channels
Retrieve a paginated list of group channels under the current App Key.
Request
POST: https://Base URL/v4/group-channel/list
Rate limit: 100 per second
Signature: Required. See API request signature.
Request body
Content type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
pageToken | String | No | Pagination token returned from the previous request. Omit for the first request. |
pageSize | Number | No | Number of results per page. Default: 50. Maximum: 1,000. |
order | Number | No | Sort order by group creation time. 0: ascending. 1: descending (default). |
Request example
HTTP
POST /v4/group-channel/list HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"pageToken": "XXXXXX",
"order": 1,
"pageSize": 50
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 0 indicates success. See Status codes. |
result | Object | Response data. |
result.pageToken | String | Pagination token for the next page. Only present if there are more results. |
result.groups | Array | List of group channel objects. |
result.groups[i].channelId | String | Group channel ID. |
result.groups[i].name | String | Group name. |
result.groups[i].profile | String | Group basic information in JSON format. |
result.groups[i].creator | String | User ID of the group creator. |
result.groups[i].owner | String | User ID of the group owner. |
result.groups[i].createdAt | Number | Timestamp when the group was created. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0,
"result": {
"pageToken": "XXXX",
"groups": [
{
"channelId": "g123",
"owner": "u23",
"creator": "u12",
"name": "g1231",
"profile": "{\"portrait_url\":\"XXX\"}",
"createdAt": 1709619756077
},
{
"channelId": "g456",
"owner": "u2333",
"creator": "u1332",
"name": "g1231",
"createdAt": 1709619756077
}
]
}
}