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/v4/channel-type/push/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/push/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

FieldTypeDescription
codeNumberStatus code. 0 indicates success.
resultObjectResponse data.
result.noDisturbLevelNumberDND notification level. -1: notify for all messages. 0: not set; follows the default group- or app-level setting. If no default is set, all messages trigger notifications. 1: notify only for @mentions. 2: notify only for @mentions of the specified user. 4: notify only for @all mentions. 5: receive no notifications.

Response example

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

{
"code": 0,
"result": {
"noDisturbLevel": 2
}
}