Bind subchannel to user groups
Bind one or more user groups to a specified community channel subchannel. Each subchannel supports up to 10 bound user groups.
- All users in successfully bound user groups receive a notification via client callback.
Request method
POST: https://Base URL/v4/community-channel/channel/user-group/bind
Rate limit: 100 requests per second
Signature required: All server API requests require signature verification. See API request signature.
Request body
The request body is in application/json format and supports the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
channelId | String | Yes | The community channel ID. |
subchannelId | String | Yes | The subchannel ID. |
userGroupIds | Array | Yes | List of user group IDs to bind. Maximum 10 per request; the entire request fails if exceeded. |
Request example
HTTP
POST /v4/community-channel/channel/user-group/bind HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"channelId": "abc",
"subchannelId": "channelid",
"userGroupIds": ["id1", "id2", "id3"]
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. 24420 = subchannel user group binding limit exceeded. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{"code":0}