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

Obtain Battle Information

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

Feature Description

The app admin can obtain battle details through this API.

API Call Description

Request URL Sample:

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

Description Of Request Parameters

The following table only lists the parameters involved in modifying when calling this API and their descriptions.
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/get_battle_info
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 Admin
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
{
"BattleId": "HuYM036AMk2JJeSUgnv5H0KDJpc+HXfqTAtGuYWzRPs=",
"RoomId": "room_pk1" //When the business side does not know the specific BattleId, you can fill in the RoomId, so that you can obtain the BattleId information of the ongoing RoomId.
}


Request Packet Field Description

Field
Type
Attribute
Description
BattleId
String
Required
ID of the PK session
RoomId
String
Optional
Room ID. When the business side does not know the specific BattleId, you can fill in the RoomId, so that you can obtain the BattleId information of the ongoing RoomId.

Example Of a Response Packet Body

Basic form
{
"ErrorCode": 0,
"ErrorInfo": "",
"ActionStatus": "OK",
"RequestId": "Id-e1fffbc751dc44bc95ec960d1fdfbefe-O-Seq-126652",
"Response": {
"BattleId": "HuYM036AMk2JJeSUgnv5H0KDJpc+HXfqTAtGuYWzRPs=",
"Duration": 120000,
"StartTime": 1739508625,
"EndTime": 1739508746,
"Status": 3,
"FromRoomInfo": {
"RoomId": "pk-3",
"Score": 100,
"Owner_Account": "brennanli1"
},
"ToRoomList": [
{
"RoomId": "pk-4",
"Score": 100,
"Owner_Account": "brennanli2"
}
]
}
}

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 success, FAIL indicates failure.
RequestId
String
Unique request ID, returned with each request, needed for troubleshooting.
BattleId
String
Battle id
Duration
Integer
Battle Duration
StartTime
Integer
the start time of battle
EndTime
Integer
the end time of battle
Status
Integer
Battle status, 1 indicates not started, 2 indicates in progress, 3 indicates ended, 4 indicates ended before starting.
FromRoomInfo
Object
Battle caller room information
ToRoomList
Array
Battle callee room information
RoomId
String
Room ID
Score
Integer
Room score
Owner_Account
String
Room Owner ID

Error Code Description

Unless a network error occurs (such as a 502 error), the HTTP return code of this API is 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.
100411
The current Battle does not exist, or the information has been cleared due to an excessively long end time.



Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan