tencent cloud

Chat

News and Announcements
Release Notes
Announcements
Product Introduction
Overview
Basic Concepts
Scenarios
Features
Account System
User Profile and Relationship Chain
Message Management
Group Related
Official Account
Audio/Video Call
Use Limits
Purchase Guide
Billing Overview
Pricing
Purchase Instructions
Renewal Guide
Service Suspension Explanation
Refund Policy
Development Guidelines
Demo Zone
Activate Service
Free Demos
Quick Run
Download
SDK and Demo Source Code
Update Log
Chat Interaction (UI Included)
TUIKit Introduction
Getting Started
Full-feature Integration
Single-function Integration
Build with AI
Build Basic Interfaces
More Features
Customizing Appearance
Internationalization
Push Service
Overview
Noun explanation
Activate the Service
Quick Start
Manufacturer Channel
Statistics
Troubleshooting Tool
Client APIs
REST API
Push Callback
Advanced Features
Release Notes
Error Codes
FAQS
Desk
Overview
Quick Start
Integration Guide
Admin Operation Manual
Agent Manual
More Practices
Live Streaming Setup Guide
AI Chatbot
Super Large Entertainment and Collaboration Community
Discord Implementation Guide
How to Integrate Chat into Games
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
No UI Integration
Quick Start
SDK Integration
Initialization
Login and Logout
Message
Conversation
Group
Community Topic
User Profile and Relationship Chain
Offline Push
Cloud Search
Local Search
Official Channel Management
Client APIs
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Server APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
Console Guide
New Console Introduction
Creating and Upgrading an Application
Basic Configuration
Feature Configuration
Account Management
Group Management
Official Channel Management
Webhook Configuration
Usage
Viewing Guide for Resource Packages
Real-Time Monitor
Auxiliary Development Tools
Access Management
Advanced Features
FAQs
uni-app FAQs
Purchase
SDK
Account Authentication
User Profile and Relationship Chain
Message
Group
Audio-Video Group
Nickname and Profile Photo
Security Compliance Certification
Service Level Agreement
Security Compliance Certification
Chat Policies
Privacy Policy
Data Privacy and Security Agreement
Migration
Migration Solutions
Migration Solutions Lite
Error Codes
Contact Us

Other Push Callbacks

PDF
Focus Mode
Font Size
Last updated: 2025-07-31 11:02:31

Feature Description

After enabling the push plugin, the push results can be forwarded to the app backend by configuring the basic callback.

Notes

This callback belongs to the event callback after downstream diffusion. To prevent a large number of callback requests from overwhelming the App backend, default QPS: 1000 times/s. Overfrequency callbacks will be retried after a delay. If you need to adjust QPS due to business requirements, you can submit a ticket to apply.
To enable this callback, you must configure the callback URL and enable the corresponding switch for this callback. For more information on the configuration method, see Webhooks documentation.
During this callback, the Chat backend initiates an HTTP POST request to the app backend.
After receiving the callback request, the app backend must check whether the SDKAppID contained in the request URL is consistent with its own SDKAppID.
For additional safety-related concerns, please refer to the Third-Party Callback Overview: Security Considerations document.

API Description

Request URL sample:

In the following example, the callback URL configured in the App configuration is https://www.example.com
Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json

Request parameters

Field
Description
https
Request protocol is HTTPS
Request method is POST
www.example.com
Callback URL
SdkAppid
SDKAppID allocated by the Instant Messaging console at the time of Application creation
CallbackCommand
Fixed as: Push.OfflinePush
contenttype
The request payload is fixed as JSON

Sample request packets

{
"Events": [ // The length of the events array ranges from 1 to 100
{
"CallbackCommand":"Push.OfflinePush",
"EventType": 1, // Event type, EventType=1 indicates single chat
"EventTime": 1557481127, // Event timestamp in seconds
"From_Account": "user1", // Sender
"To_Account": "user2", // Recipient
"PushPlatform": 1, // Vendor
"PushStage": 1, // Push stage
"MsgKey": "48374_2837546_1557481126", // Unique identifier of the single chat message
"MsgSeq": 48374, // Sequence number of the message
"MsgRandom": 2837546, // Random number of the message
"MsgTime": 1557481126, // Timestamp in seconds indicating when the message is sent
"PushID": "67120c46_6a4086c0_9bf5fb50_200002d1089b322_2000005d8d46421", // Unique identifier of the push
"ErrCode": 0, // Push event result
"ErrInfo": "OK" // Push event result description, may be empty
},
{
"CallbackCommand":"Push.OfflinePush",
"EventType": 2, // Event type, EventType=2 indicates group chat
"EventTime": 1557481127, // Event timestamp in seconds
"From_Account": "user2", // Sender
"To_Account": "user3", // Recipient
"PushPlatform": 1, // Vendor
"PushStage": 1, // Push stage
"GroupID": "@TGS#12DEVUDHQ", // Group chat ID
"MsgSeq": 48375, // Sequence number of the message
"MsgRandom": 2837546, // Random number of the message
"MsgTime": 1557481126, // Timestamp in seconds indicating when the message is sent
"PushID": "6710c631_85_392fcbcff_200000b2f2c6820_200002c869bfb81", // Unique identifier of the push
"ErrCode": 0, // Push event result
"ErrInfo": "OK" // Push event result description, may be empty
},
....
]
}

Request packet fields

Field
Type
Description
Events
Array [ Event Object ]
Batch callback content, containing data for up to 100 callback events (Event Object)
Event Object Structure
Field
Type
Description
CallbackCommand
String
Callback command
EventType
Integer
Event Type:
EventType = 1 indicates single chat
EventType = 2 indicates group chat
EventTime
Integer
Event timestamp in seconds
From_Account
String
Message Sender UserID
To_Account
String
Recipient's UserID
PushPlatform
Integer
Vendor:
PushPlatform = 0 indicates unknown vendor
PushPlatform = 1 indicates Apple APNS push
PushPlatform = 2 indicates Xiaomi push
PushPlatform = 3 indicates Huawei push
PushPlatform = 4 indicates Google FCM push
PushPlatform = 5 indicates Meizu push
PushPlatform = 6 indicates OPPO push
PushPlatform = 7 indicates vivo push
PushPlatform = 8 indicates Honor push
PushStage
Integer
Push stage:
PushStage = 1 indicates push sending stage
PushStage = 2 indicates push delivery stage
PushStage = 3 indicates push click stage
MsgKey
String
The unique identifier of a single chat message, valid only when EventType = 1. This field is empty for group chats.
GroupID
String
Group ID for group chats, valid only when EventType = 2. This field is empty for single chats.
MsgSeq
Integer
Message serial number, utilized for marking the respective message (32-bit unsigned integer)
MsgRandom
Integer
Message random number used to mark the message (32-bit unsigned integer). This field is empty for group chats.
MsgTime
Integer
Message sending timestamp in seconds
PushID
String
Unique identifier of the push, can be used to query push delivery status in the Chat console with PushID
ErrCode
Integer
Push event result:
ErrCode = 0 indicates success
ErrCode non-zero indicates failure
ErrInfo
String
Push event result description, may be empty

Response packet example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // 0 means callback success, 1 means callback error
}

Response packet field description

Field
Type
Description
ActionStatus
String
Processed Request Result:
OK Signifies Successful Handling
FAILURE signifies unsuccessful execution
ErrorCode
Integer
Error Code
ErrorInfo
String
Error Description



Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback