Callback After Single Chat Message Recall
Description
The App backend can use this callback to receive requests for recalling a user's single chat message.
Important Notes
- To enable this callback, configure the callback URL and activate the corresponding protocol switch. For configuration details, see the Callback Introduction document.
- The callback direction is from OpenIMServer to the App backend as an HTTP/HTTPS POST request.
- The App backend must respond to this request within the specified timeout.
Scenarios that Trigger This Callback
- An App user recalls a single chat message through the client.
- An administrator recalls a single chat message through the
admin_msgwithdraw
REST API.
Timing of Callback
- After the single chat message has been successfully recalled.
Interface Description
Example Request URL
The CallbackCommand
here is: callbackBeforeAfterMsgCommand
{WEBHOOK_ADDRESS}/callbackBeforeAfterMsgCommand?contenttype=json
Example Request Package
{
"callbackCommand": "callbackBeforeAfterMsgCommand",
"conversationID": "si_u1_u2:0",
"seq": 10,
"userID": "user456"
}
Request Package Field Descriptions
Field | Type | Description |
---|---|---|
callbackCommand | string | Callback command for recalling a single chat message |
conversationID | string | Conversation ID |
seq | string | Message sequence number |
userID | string | User ID of the message sender |
Example Response Package
Success Response
The backend confirms successful processing of the recall request.
{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": 0
}
Response Package Field Descriptions
Field | Value | Description |
---|---|---|
actionCode | 0 | Indicates whether the callback was successfully executed. 0 means success. |
errCode | 0 | Custom error code; 0 to ignore the callback result. |
errMsg | "An error message" | Simple error message for the custom error code |
errDlt | "Detailed error information" | Detailed error message |
nextCode | 1 | Next step directive, 1 to halt further action if actionCode is 0 |