tencent cloud

Chat

DokumentasiChatServer APIsWebhooksOne-to-One Message WebhooksCallback After Message Read Receipt in C2C Chat

Callback After Message Read Receipt in C2C Chat

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-07-10 15:17:53

Overview

The App backend uses this webhook to track Message Read Receipt events for C2C Messages in real time.

Notes

To enable this webhook, configure the webhook URL and activate the corresponding toggle for this webhook. For setup instructions, see the Third-Party Webhook Configuration documentation.
Webhook requests are sent from the Chat backend to the App backend via HTTPS POST.
Upon receiving a webhook request, the App backend must verify that the SDKAppID in the request URL matches its own SDKAppID.
For additional security guidelines, refer to Third-Party Webhook Overview: Security Considerations.

Scenarios That May Trigger This Webhook

An App user sends a Message Read Receipt for a single C2C Message from the client.
An App administrator marks a C2C Message as read using the REST API Send C2C Message Read Receipt.

Webhook Trigger Timing

The webhook is triggered after a Message Read Receipt for a C2C Message is sent successfully.

API Description

Request URL Example

In the following example, the App's webhook URL is set to https://www.example.com.
Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform

Query Parameters

Parameter
Description
https
Request protocol is HTTPS; request method is POST.
www.example.com
Webhook URL.
SdkAppid
SDKAppID assigned when the application is created in the Chat Console.
CallbackCommand
Fixed value: C2C.CallbackAfterMsgReadReceipt.
contenttype
Request body format is always JSON.
ClientIP
Client IP address (format: 127.0.0.1).
OptPlatform
Client platform. For details, see Third-Party Webhook Overview: Webhook Protocol, OptPlatform section.

Request Example

{
"CallbackCommand": "C2C.CallbackAfterMsgReadReceipt", // Webhook command
"Operator_Account": "jared", // Sender of the Message Read Receipt
"Peer_Account": "Jonh", // Conversation peer
"C2CMsgInfo": [
{
"From_Account": "Jonh",
"To_Account": "jared",
"MsgKey": "33973751_24064952_1769139583",
"MsgId": "144115433090395387-1769139578-24064952"
}
],
"EventTime": 1769139587754 // Timestamp when Message Read Receipt was sent
}

Request Fields

Field
Type
Description
CallbackCommand
String
Webhook command.
Operator_Account
String
UserID of the Message Read Receipt sender.
Peer_Account
String
UserID of the conversation peer.
EventTime
Integer
Timestamp when the Message Read Receipt was sent.
MsgKey
String
MsgKey of the message.
MsgId
String
MsgId of the message.

Response Example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // 0 indicates webhook succeeded; 1 indicates webhook error
}

Response Fields

Field
Type
Required
Description
ActionStatus
String
Required
Result of request:
OK indicates success.
FAIL indicates failure.
ErrorCode
Integer
Required
Error code:
0 means success.
1 means means there is an error.
ErrorInfo
String
Required
Error message.

References

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan