tencent cloud

Tencent Real-Time Communication

Release Notes and Announcements
Release Notes
Recent Product Announcement
TRTC Live (TUILiveKit) Product Launch Announcement
TRTC Conference Official Editions Launched
The commercial version of Conference is coming soon
Terms and Conditions Applicable to $9.9 Starter Package
Rules for the "First Subscription $100 Discount" Promotion
Announcement on the Start of Beta Testing for Multi-person Audio and Video Conference
TRTC Call Official Editions Launched
License Required for Video Playback in New Version of LiteAV SDK
TRTC to Offer Monthly Packages
Product Introduction
Overview
Concepts
Features
Strengths
Use Cases
Performance Statistics
Tencent RTC Quickplay: Experience Ultimate Real-Time Audio and Video Interaction!
Purchase Guide
Billing Overview
Free Minutes
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
FAQs
Refund Instructions
User Tutorial
Free Demo
Call
Overview
Activate the Service
Run Demo
Integration
Offline Call Push
Conversational Chat
On-Cloud Recording
AI Noise Reduction
UI Customization
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
Release Notes
FAQs
Conference
Overview(TUIRoomKit)
Activate the Service (TUIRoomKit)
Run Demo(TUIRoomKit)
Integration(TUIRoomKit)
Screen Sharing (TUIRoomKit)
Schedule a meeting (TUIRoomKit)
In-meeting Call (TUIRoomKit)
UI Customization(TUIRoomKit)
Virtual Background (TUIRoomKit)
Conference Control (TUIRoomKit)
Cloud Recording (TUIRoomKit)
AI Noise Reduction (TUIRoomKit)
In-Conference Chat (TUIRoomKit)
Robot Streaming (TUIRoomKit)
Enhanced Features (TUIRoomKit)
Client APIs (TUIRoomKit)
Server APIs (TUIRoomKit)
FAQs (TUIRoomKit)
Error Code (TUIRoomKit)
SDK Update Log (TUIRoomKit)
Live
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Run 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 Download
API Examples
Usage Guidelines
API Reference Manual
Advanced Features
AI Integration
Overview
Configure MCP Server
Install Skills
Integration Guide
FAQ
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
Console Guide
Application Management
Package Management
Usage Statistics
Monitoring Dashboard
Development Assistance
Solution
Real-Time Chorus
FAQs
Migration Guide
Billing
Features
UserSig
Firewall Restrictions
How to Downsize Installation Package
Android and iOS
Web
Flutter
Electron
TRTCCalling for Web
Audio and Video Quality
Others
Legacy Documentation
RTC RoomEngine SDK(Old)
Integrating TUIRoom (Web)
Integrating TUIRoom (Android)
Integrating TUIRoom (iOS)
Integrating TUIRoom (Flutter)
Integrating TUIRoom (Electron)
TUIRoom APIs
On-Cloud Recording and Playback (Old)
RTC Analytics Monthly Packages (Previous Version)
Protocols and Policies
Compliance
Security White Paper
Notes on Information Security
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC Policy
Privacy Policy
Data Processing And Security Agreement
Glossary

Create Battle

PDF
Focus Mode
Font Size
Last updated: 2025-12-30 15:25:10

Feature Description

The App admin can create battle through this API.

API Call Description

Request URL Sample:

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

Description Of Request Parameters

The table below only lists the parameters modified when this interface is called. For more details on other parameters, please refer to RESTful API Overview.
Parameters
Description
xxxxxx
The exclusive domain name corresponding to the country/region of SDKAppID:
China: console.tim.qq.com
Singapore: adminapisgp.im.qcloud.com
United States: adminapiusa.im.qcloud.com
v4/live_engine_http_pk/create_battle
Request API
sdkappid
The SDKAppID assigned by the Chat console when creating an application
identifier
Must be an App admin account. For more details, see App Administrator
usersig
Signatures generated by the App admin account. For specific operations, see Generate UserSig
random
Please enter a random 32-bit unsigned integer, value range 0 - 4294967295
contenttype
The request format has a fixed value of JSON.

Maximum Call Frequency

200 times/second.

Request Packet Sample

Basic form
{
"FromRoomId":"pk-1", //Caller's room ID in PK
"ToRoomIdList":["pk-2","pk-3"], //List of callee's room IDs in PK
"Duration":60000, //Duration of PK
"ExtensionInfo":"extension pk"
}

Request Packet Field Description

Field
Type
Attribute
Description
FromRoomId
String
Required
Caller's room ID in PK
ToRoomIdList
String
Required
List of callee room IDs in PK
Duration
Integer
Required
PK Duration
ExtensionInfo
String
Optional
PK Information Extension Field
Note:
Before initiating PK, ensure that all participating rooms are in a connected state. This API does not verify the connection status. When PK is initiated, the SDK will notify the room owners of all participating rooms.

Response Packet Body Sample:

Basic form
{
"ErrorCode": 0,
"ErrorInfo": "",
"ActionStatus": "OK",
"RequestId": "requestId-123-456",
"Response":{
"BattleId": "battleid1",
"Result": [
{
"RoomId": "pk-2",
// 0 indicates initiate successfully
// 3 indicates that it is already in another PK.
// 5 System error

"ResultCode": 0,
"ResultMessage": "",
},
{
"RoomId": "pk-3",
"ResultCode": 0,
"ResultMessage": "",
}
],
}
}


Response Packet Field Description

Field
Type
Description
ErrorCode
Integer
Error code. 0 indicates success; non-zero indicates failure.
ErrorInfo
String
Error message.
ActionStatus
String
Result of request processing. OK indicates successful processing, FAIL indicates failure.
RequestId
String
Unique request ID, returned with each request, needed for troubleshooting.
BattleId
String
ID of this PK
Result
Array
PK situation of the callee
RoomId
String
Room ID
ResultCode
Integer
Result: 0 indicates success, 3 indicates being in PK, and 5 indicates a system error.
ResultMessage
String
PK Result Information

Error Code Description

Unless a network error occurs (such as a 502 error), the HTTP return code of this API is always 200. The real error code and error message are in the response packet body.Represented by ErrorCode and ErrorInfo.
Common Error Codes (60000 to 79999) refer to Error Code documentation.
The private error codes of this API are as follows:
Error Code
Description
100001
Server internal error, please retry.
100002
The parameter is illegal. Check whether the request is correct according to the error description.
100003
The Room ID already exists. Please select another Room ID.
100412
All called rooms are in PK. Please try again later.
100415
The caller is in PK. Please try again later.

Help and Support

Was this page helpful?

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

Feedback