tencent cloud

Mobile Live Video Broadcasting

Release Notes and Announcements
TUILiveKit Release Notes
Live SDK Release Notes
User Guide
Product Introduction
Overview
Strengths
Performance Statistics
Concepts
Purchase Guide
TRTC Live Billing Overview
Billing of Video Live Component
Activating the Service (TUILiveKit)
Free Demo
Demo
Run Demo(TUILiveKit)
Integration Guide
Video Live Streaming
Preparation
Host Live Streaming
Audience Viewing
Live Stream List Live Stream List
Voice Chat Room
Preparation
Host Live Streaming
Audience Viewing
Live Stream List
Live Streaming Kit
Live Streaming Kit(Electron Desktop Application)
Live Streaming Kit(Web Desktop Browser)
Live Broadcast Monitoring
Monitoring Webpage (Web Desktop Browser React)
Monitoring Webpage (Web Desktop Browser Vue)
UI Customization
Live Stream Video Component
Video Source Editing Canvas
Audience List Component
Barrage Component
Media Source Configuration Panel
Link Management Panel
Live Gift Component
No UI Integration
Video Live Streaming
Voice Chat Room
Feature Guide
Follow Anchors (TUILiveKit)
Ultimate Image Quality (TUILiveKit)
Push Media Stream Into Room (TUILiveKit)
Gift System (TUILiveKit)
Client APIs
Android
iOS
Web
Server APIs (TUILiveKit)
Account System
REST API
Third-Party Webhooks
Error Codes (TUILiveKit)
FAQs
Platform Compilation
User Authentication
Live SDK
Product Introduction
Purchase Guide
Free Demo
Free Trial License
SDK Download
Licenses
Advanced Features
Client API
FAQs
Integration (No UI)
API Documentation
OSS information
OSS Attribution Notice

Create Battle

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-03-11 12:09:51

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.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan