Skip to main content

Add private subchannel members

Add users to the private subchannel member list for a specified community channel subchannel.

All user IDs must already be members of the community channel. If any user is not a community channel member, the entire request fails.

You can create a private member list for any subchannel (public or private). The member list is enforced when the subchannel type is set to private — only listed members can send and receive messages.

Request method

POST: https://Base URL/v4/community-channel/private-subchannel/member/add

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:

ParameterTypeRequiredDescription
channelIdStringYesThe community channel ID.
subchannelIdStringYesThe subchannel ID.
userIdsArrayYesList of user IDs. Maximum 20 per request. All must be community channel members.

Request example

HTTP
POST /v4/community-channel/private-subchannel/member/add 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": "channel001",
"userIds": ["user1", "userId2"]
}

Response

The response body contains a JSON object with the following structure:

FieldTypeDescription
codeNumberStatus code. 0 indicates success. Error code 24406 indicates one or more user IDs are not community channel members.

Response example

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

{"code":0}