Skip to main content

Query Do Not Disturb Status for a Specific Conversation

Query the Do Not Disturb status set by a specific user (requestId) for a specific conversation (targetId).

tip

This setting is at the user level. For the corresponding setting API, see Set Do Not Disturb for a Specific Conversation.

Request Method​

POST: https://data center domain/conversation/notification/get.json

Rate Limit: 100 requests per second

Signature Rule: All server API requests require signature verification. For details, see API Request Signature.

Body Parameters​

The HTTP request body data format is application/x-www-form-urlencoded, and the following HTTP form parameters are supported:

ParameterTypeRequiredDescription
conversationTypeStringYesConversation type. Supported conversation types include: 1 (one-to-one chat), 3 (group chat), 6 (system conversation), 10 (ultra group chat). To query the Do Not Disturb setting for a specific channel in an ultra group, pass the channel ID (busChannel).
requestIdStringYesThe user ID of the user who set the Do Not Disturb status.
targetIdStringYesThe target ID, which could be a user ID or group ID depending on the conversation type (ConversationType).
busChannelStringNoThe channel ID of the ultra group conversation.
  • If a channel ID is passed, the Do Not Disturb level for that channel will be queried.
  • Note: If no channel ID is specified, the Do Not Disturb level for messages in the specified ultra group conversation (targetId) that do not belong to any channel will be queried.

Request Example​

POST /conversation/notification/get.json HTTP/1.1
Host: api.rong-api.com
App-Key: uwd1c0sxdlx2
Nonce: 14314
Timestamp: 1408710653491
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/x-www-form-urlencoded

conversationType=2&requestId=b5NwvIrW8&targetId=2MqOJa1Un

Response​

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

Return ValueTypeDescription
codeNumberReturn code, 200 indicates success.
isMutedIntThe Do Not Disturb setting status.
  • -1: All messages are notified.
  • 0: Not set (if the user has not set it, the default setting at the group or app level will be used. If no setting is specified, all messages are notified).
  • 1: Only @ messages are notified.
  • 2: Only @ messages targeting specific users are notified.
  • 4: Only @ messages targeting all group members are notified.
  • 5: No notifications are received.

Response Example​

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

{"code":200,"isMuted":0}