Skip to main content

Add to allowed senders list

Add one or more community channel members to the allowed senders list for a specified community channel or subchannel.

After freezing a community channel or subchannel, you may need to allow specific users to continue sending messages via client SDK. The simplest approach is to configure the allowed senders list at the matching level:

  • After freezing a community channel, add users to the community channel's allowed senders list to let them send messages.
  • After freezing a subchannel, add users to that subchannel's allowed senders list to let them send messages.
tip
  • Allowed senders list status persists even if the user leaves and rejoins the community channel.
  • Allowed senders list status persists even if the community channel is dismissed and recreated.

Request method

POST: https://Base URL/v4/community-channel/allowed-sender-list/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.
subchannelIdStringNoThe subchannel ID.
userIdsArrayYesList of user IDs. Maximum 20 per request.

Request example

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

{
"channelId": "abcdefg",
"userIds": ["userId_001", "userId_002"]
}

Response

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

FieldTypeDescription
codeNumberStatus code. 0 indicates success.

Response example

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

{"code":0}

Interaction with individual muting

If your app also uses individual muting (muting specific members at the community channel or subchannel level), note the following behavior when individual mute and allowed senders list scopes match (both at the same level), the allowed senders list takes precedence:

  • Case 1: A user is individually muted at the community channel level. If the user is on the community channel allowed senders list, they can send messages.
  • Case 2: A user is individually muted at the subchannel level. If the user is on that subchannel's allowed senders list, they can send messages.

When scopes differ, community channel-level settings take higher priority:

  • Case 3: A user is muted at the community channel level. If the user is only on a subchannel allowed senders list, they cannot send messages.
  • Case 4: A user is muted at the subchannel level. If the user is on the community channel allowed senders list, they can still send messages.