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

Before a Official Channel Is Created

PDF
Focus Mode
Font Size
Last updated: 2025-05-27 10:16:20

Feature Overview

The app backend can use this webhook to view requests for creating official channels in real time, including the ability to reject these requests.

Notes

To enable the webhook, you must configure the webhook URL and enable corresponding switch for this webhook protocol. more information on the configuration method, see Webhook Configuration.
During this webhook, the Chat backend initiates an HTTP POST request to the app backend.
After receiving the webhook request, the app backend must check whether the SDKAppID contained in the request URL is the SDKAppID of the app.
For additional safety-related concerns, please refer to the Webhook Overview: Security Considerations document.

Webhook Triggering Scenarios

The app administrator creates a Official Account via the REST API.

Webhook Triggering Timing

Chat backend is preparing to create a Official Account.

API Calling Description

Sample request URL

In the subsequent example, the webhook URL configured within the app is https://www.example.com. Example:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform

Request parameters

Parameter
Description
https
The request protocol is HTTPS, and the request method is POST.
www.example.com
Callback URL.
SdkAppid
SDKAppID assigned by the Chat console when an app is created.
CallbackCommand
Fixed to: OfficialAccount.CallbackBeforeCreateOfficialAccount.
contenttype
Fixed value: JSON.
ClientIP
Client IP, such as: 127.0.0.1.
OptPlatform
Client Platform, for values please refer to Webhook Overview: Callback Protocol for the meaning of the OptPlatform parameter.

Sample request

{
"CallbackCommand": "OfficialAccount.CallbackBeforeCreateOfficialAccount", // Callback command
"Operator_Account": "107867", // Operator
"Owner_Account": "107867", // Creator
"Name": "TestOfficialAccount", // Name of the official channel
"EventTime": 1670574414123// Event trigger timestamp in milliseconds
}

Request fields

Object
Features
Feature
CallbackCommand
String
Webhook command.
Operator_Account
String
UserID of the operator who initiates the create request.
Owner_Account
String
The creator of the official channel, who is also the owner of the official channel.
Name
String
Name of the official channel to be created.
EventTime
Integer
Event trigger timestamp in milliseconds.

Sample response

Allows creation

Allows users to create official channels.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0 // Allows creation
}

Prohibit Creation

Users are not allowed to create official channels. The official channel will not be created, and the error code 20006 will be returned to the caller.
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 1 // Denied Creation
}

Response fields

Field
Type
Attribute
Description
ActionStatus
String
Mandatory
Processed Request Result:
OK: Indicates successful processing
FAIL: Indicates failure
ErrorCode
Integer
Mandatory
Error Code, 0 allows creation; 1 denies creation. If the service wishes to use its own error code to deny user group creation, pass the error code ErrorCode and ErrorInfo to the client. Please set the ErrorCode within the range [120001, 130000].
ErrorInfo
String
Mandatory
Error message.

References



Help and Support

Was this page helpful?

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

Feedback