tencent cloud

Tencent Real-Time Communication

お知らせ・リリースノート
製品アップデート情報
Tencent Cloudオーディオビデオ端末SDKの再生アップグレードおよび承認チェック追加に関するお知らせ
TRTCアプリケーションのサブスクリプションパッケージサービスのリリースに関する説明について
製品の説明
製品概要
基礎概念
製品の機能
製品の強み
ユースケース
性能データ
購入ガイド
Billing Overview
無料時間の説明
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
課金に関するよくあるご質問
Refund Instructions
初心者ガイド
Demo体験
Call
コンポーネントの説明(TUICallKit)
Activate the Service
Run Demo
クイック導入
オフライン通知
Conversational Chat
クラウドレコーディング(TUICallKit)
AI Noise Reduction
インターフェースのカスタマイズ
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
公開ログ
よくある質問
ライブ配信
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Demo のクイックスタート
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDKのダウンロード
APIコードサンプル
Usage Guidelines
クライアント側 API
高度な機能
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
コンソールガイド
アプリケーション管理
使用統計
監視ダッシュボード
開発支援
Solution
Real-Time Chorus
よくあるご質問
課金関連問題
機能関連
UserSig関連
ファイアウォールの制限の対応関連
インストールパッケージの圧縮に関するご質問
AndriodおよびiOS関連
Web端末関連
Flutter関連
Electron関連
TRTCCalling Web関連
オーディオビデオ品質関連
その他のご質問
旧バージョンのドキュメント
TUIRoom(Web)の統合
TUIRoom (Android)の統合
TUIRoom (iOS)の統合
TUIRoom (Flutter)の統合
TUIRoom (Electron)の統合
TUIRoom APIのクエリー
クラウドレコーディングと再生の実現(旧)
Protocols and Policies
セキュリティコンプライアンス認証
セキュリティホワイトペーパー
情報セキュリティの説明
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC ポリシー
プライバシーポリシー
データ処理とセキュリティ契約
用語集

Send Custom Message

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-02-24 16:59:14

Feature Description

The App admin can use this API to send custom messages via this interface.

API Call Description

Sample Request URL

https://xxxxxx/v4/live_engine_http_srv/send_custom_msg?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json

Request Parameters

The following table lists only the parameters involved in modification when calling this API and their descriptions. For more details about the parameters, please refer to REST API introduction.
Parameter
Description
xxxxxx
SDKAppID's dedicated domain name where it is located:
China: console.tim.qq.com
Singapore: adminapisgp.im.qcloud.com
United States: adminapiusa.im.qcloud.com
v4/live_engine_http_srv/send_custom_msg
Request API
sdkappid
The SDKAppID assigned by the Chat console when creating an application can be obtained from the application card in the Console of Chat.
identifier
Must be an application admin account. For more details, see the documentation Application Administrator.
usersig
The signature generated by the application admin account. For specific operations, see Generate UserSig.
random
Enter a random 32-bit unsigned integer, value ranges from 0 to 4294967295.
contenttype
Request format, the value is fixed as json.

Maximum Calling Frequency

200 times/second。

Sample Request Packet

Basic form

{
"RoomId":"room1",
"Sender_Account":"user1",
"BusinessId":"xxxxx",
"Data":"zzzzzzz"
}



Request Packet Fields

Field
Type
Attribute
Description
RoomId
String
Required
Room ID.
Sender_Account
String
Optional
Message sender.
BusinessId
String
Required
Mark of message.
Data
Integer
Required
Message content.

Message Format Description

This endpoint is a wrapper for standard Chat group messages. The MsgBody in the request body follows the custom message format. The wrapped request structure is as follows:
{
"MsgBody" : [
{
"MsgContent" : {
"Data" : "{\\"BusinessId\\":\\"key\\",\\"Data\\":\\"value\\"}"
},
"MsgType" : "TIMCustomElem"
}
}

Data: A JSON string composed of the BusinessId and Data fields from the original message request.
Callback Integration
This request information is utilized in message callbacks. For detailed descriptions, please refer to the Before a Group Message Is Sent and After a Group Message Is Sent documentation.

Response Package Example


{
"ErrorCode": 0,
"ErrorInfo": "",
"ActionStatus": "OK",
"RequestId": "Id-b6454678e8a647ffa476ec1fee1263d1-O-Seq-2433991",
"Response": {
"MsgTime": 1750074537,
"MsgSeq": 26,
"MsgDropReason" : "MsgFreqCtrl"
}
}


Response Packet Fields

Field
Type
Description
ActionStatus
String
Request processing result.
OK: processing successful.
FAIL: processing failed.
ErrorCode
Integer
Error Code.
0: success.
Non-zero: Indicates Failure.
ErrorInfo
String
Error message.
RequestId
String
Unique request ID, returned for each request. To locate a problem, the RequestId of the request should be provided.
MsgTime
Integer
Message sending timestamp, corresponding to the backend server time.
MsgSeq
Integer
Message sequence number, the unique identifier of a message.
MsgDropReason
String
Reason for discarding the message. It is empty by default. Currently, only messages that exceed the frequency limit are discarded.

Error Code Description

Unless a network error (such as 502) occurs, the HTTP return code of this API is 200. The actual error code and error information are indicated by ErrorCode and ErrorInfo in the response payload.
Common error codes (60000 to 79999), please refer to the Error Code document.
Private error codes of this API are as follows:
Error Code
Description
100001
Server internal error, please try again.
100002
Invalid parameter. Check whether the request is correct according to the error description.
100004
The room does not exist, possibly because it was never created or has already been dissolved.
100006
Indicates that this room is not a live room and does not have permission to use live query interfaces.
100601
The message cannot be sent due to muting. Check whether the sender is muted.
100602
The frequency limit for message sending is reached. Try again later.
100603
The message content is too long. Currently, the maximum message length supported is 12 KB. Please adjust the message length.


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック