Get DND by channel type
Query the Do Not Disturb (DND) notification level that a user has set for a specific channel type.
tip
This is a user-level setting. See Set DND by channel type for the corresponding set API.
Request
POST: https://[Base URL](/platform-chat-api/base-url)/v4/channel-type/notification/get
Rate limit: 100 requests per second
Authentication: All server API requests require signature verification. See API request signing.
Request body
Content type: application/json
| Parameter | Type | Required | Description |
|---|---|---|---|
channelType | String | Yes | Channel type. 1: direct. 3: group. 6: system. 10: community. |
requestId | String | Yes | User ID. |
Request example
HTTP
POST /v4/channel-type/notification/get HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json
{
"channelType": 1,
"requestId": "b5NwvIrW8"
}
Response
| Property | Type | Description |
|---|---|---|
code | Number | Status code. 0 indicates success. |
result | Object | Response data. |
result.muteStatus | Number | Notification level: -1 (all), 0 (not set), 1 (@ messages only), 2 (specific @ only), 4 (@all only), 5 (none). |
Response example
HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
{
"code": 0,
"result": {
"muteStatus": 2
}
}