Callback After Group Message Read Report
Description
The App’s business server can use this callback to track when users mark a group chat message as read.
Important Notes
- To enable this callback, configure the callback URL and activate the corresponding protocol switch. For configuration details, refer to the Callback Introduction document.
- The callback is initiated from the OpenIM Server to the App backend as an HTTP/HTTPS POST request.
- The App business server must respond within the timeout period.
Scenarios that Trigger This Callback
- A user reads a message in a group chat.
Timing of Callback
- Triggered after the read report of a group chat message is successfully submitted.
Interface Description
Example Request URL
The CallbackCommand
here is: callbackAfterGroupMsgReadCommand
{WEBHOOK_ADDRESS}/callbackAfterGroupMsgReadCommand?contenttype=json
Example Request Package
{
"callbackCommand": "callbackGroupMsgReadCommand",
"sendID": "user123",
"receiveID": "group789",
"unreadMsgNum": 5,
"contentType": 101
}
Request Package Field Descriptions
Field | Type | Description |
---|---|---|
callbackCommand | string | Callback command, indicating a group message read report. |
sendID | string | User ID of the sender of the message. |
receiveID | string | Group ID of the message recipient. |
unreadMsgNum | int64 | Number of unread messages. |
contentType | int | Type of message content. |
Example Response Package
{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": ""
}
Response Package Field Descriptions
Field | Value | Description |
---|---|---|
actionCode | 0 | Indicates if the callback was executed correctly. 0 means success. |
errCode | 0 | Custom error code, set to 0 to ignore callback results. |
errMsg | "An error message" | Simple error message for the custom error code. |
errDlt | "Detailed error information" | Detailed error information for the custom error code. |
nextCode | 1 | Next action code, set to 1 to halt further action if actionCode is 0 . |