Callback After Single Chat Message Read Report
Description
The App backend can use this callback to view the read status of users' single chat messages in real-time.
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 reports a single chat message as read through the client.
 - An administrator sets a single chat message as read through the REST API.
 
Timing of Callback
- After a single chat message is successfully marked as read.
 
Interface Description
Example Request URL
The CallbackCommand here is: callbackAfterSingleMsgReadCommand
{WEBHOOK_ADDRESS}/callbackAfterSingleMsgReadCommand?contenttype=json
Example Request Package
{
  "callbackCommand": "callbackAfterSingleMsgReadCommand",
  "conversationID": "si_u1_u2:0",
  "userID": "user123",
  "seqs": [20, 35],
  "contentType": 101
}
Request Package Field Descriptions
| Field | Type | Description | 
|---|---|---|
| callbackCommand | string | Callback command for the single chat message read report | 
| conversationID | string | Conversation ID | 
| userID | string | User ID of the message receiver | 
| contentType | int32 | Message content type | 
| seqs | []int64 | Sequence numbers of the read messages | 
Example Response Package
Success Response
The backend successfully receives and processes the single chat message read report.
{
    "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 | 20001 | Custom error code, ranges from 20001-29999, set when actionCode is not 0, or nextCode is not 1 | 
| 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 |