Skip to main content

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

ParameterTypeRequiredDescription
channelTypeStringYesChannel type. 1: direct. 3: group. 6: system. 10: community.
requestIdStringYesUser 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

PropertyTypeDescription
codeNumberStatus code. 0 indicates success.
resultObjectResponse data.
result.muteStatusNumberNotification 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
}
}