Skip to main content

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

FieldTypeDescription
callbackCommandstringCallback command, indicating a group message read report.
sendIDstringUser ID of the sender of the message.
receiveIDstringGroup ID of the message recipient.
unreadMsgNumint64Number of unread messages.
contentTypeintType of message content.

Example Response Package

{
"actionCode": 0,
"errCode": 0,
"errMsg": "",
"errDlt": "",
"nextCode": ""
}

Response Package Field Descriptions

FieldValueDescription
actionCode0Indicates if the callback was executed correctly. 0 means success.
errCode0Custom 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.
nextCode1Next action code, set to 1 to halt further action if actionCode is 0.