Globally mute a user
Globally mute a user across all open channels under the current App Key. A globally muted user cannot send messages in any open channel via the client SDK.
important
- Global mute overrides the per-channel allowed senders list. A user on the allowed senders list is still muted if globally muted.
- Messages sent via the Platform Chat API are not affected by the mute.
Request
POST: https://Base URL/v4/open-channel/global-mute-list/add
Rate limit: 100 per second
Signature: Required. See API request signature.
Request body
Content type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
participantIds | Array | Yes | User IDs to globally mute. Maximum 20 per request. |
durationMinutes | Number | Yes | Mute duration in minutes. Maximum: 43,200 (30 days). |
extra | String | No | JSON-formatted extra data carried in the notification. Valid only when needNotify is true. |
needNotify | Boolean | No | Whether to notify the user. The default is false, which sends no notification. If true, the client triggers the corresponding callback. Only the muted user receives the notification. |
Request example
HTTP
POST /v4/open-channel/global-mute-list/add HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"participantIds": [
"2582",
"2583"
],
"durationMinutes": 1
}
Response
| Field | Type | Description |
|---|---|---|
code | Number | Return code. 0 indicates success. |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0
}