Skip to main content

Recall Broadcast to Users Message-bearing Notification

Recalling a specified message essentially involves sending a recall command message. Upon receiving the recall command message, the mobile client will delete the original target message and generate a notification message with objectName as RC:RcNtf. The chat UI can display this notification based on RC:RcNtf.

The following message types sent via the following functionalities can be recalled:

tip

The recall command message is also stored in the message history. When the SDK retrieves historical messages, it will fetch both the recall command message and the original message that was recalled. The mobile SDK has already implemented the deletion logic internally, so developers do not need to handle it separately.

Request Method

POST: https://data center domain/message/broadcast/recall.json

Rate Limit: Up to 2 times per hour, and a maximum of 3 times per calendar day.

Signature Rule: All server API requests must be validated according to the signature rules. For details, refer to API Request Signature.

Body Parameters

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

ParameterTypeRequiredDescription
fromUserIdStringYesThe user ID of the message sender.
messageUIDStringYesThe unique identifier of the message. Currently, this can only be obtained from the Message History Log, where the corresponding field is msgUID.
  • There is a delay in retrieving message history log data. For details, refer to Message History Log.
  • Messages sent via Broadcast to Users Message-bearing Notification do not support the Post-messaging Callback service, so the value of this field cannot be obtained via the Post-messaging Callback service.
sentTimeLongNoThe message sending time. Currently, this can only be obtained from the Message History Log, where the corresponding field is dateTime.
  • There is a delay in retrieving message history log data. For details, refer to Message History Log.
  • Messages sent via Broadcast to Users Message-bearing Notification do not support the Post-messaging Callback service, so the value of this field cannot be obtained via the Post-messaging Callback service.
isAdminIntNoWhether the sender is an administrator. The default is 0.
isDeleteIntNoBy default, when set to 0, the message is recalled, and the client replaces it with a gray bar recall notification. When set to 1, the message is deleted without being replaced by a gray bar notification.
extraStringNoExtended information, which can contain arbitrary data.
disableUpdateLastMsgBooleanNoPrevent updating the last message in the conversation. When this parameter is false, the sent message will appear in the conversation list; when true, it will not update the message content in the conversation list.
Note: This parameter only applies to messages stored on the client.

Request Example

POST /message/recall.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

fromUserId=fDR2cVpxxR5zSMUNh3yAwh&messageUID=5FGT-7VA9-G4DD-4V5P&sentTime=1507778882124

Response

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

Return ValueTypeDescription
codeNumberReturn code, 200 indicates success.

Response Example

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

{"code":200}