tencent cloud

All product documents
Tencent Real-Time Communication
Set Battle Score
Last updated: 2025-02-28 18:08:12
Set Battle Score
Last updated: 2025-02-28 18:08:12

Feature Description

The app admin can use this API to set the scores of the rooms in Battle.

API Call Description

Request URL Sample:

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

Description Of Request Parameters

The table below 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
v4/live_engine_http_pk/set_battle_score
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=",
"OpType":1,
"ScoreList":[
{
"RoomId":"pk-live1",
"Score":100
},
{
"RoomId":"pk-live2",
"Score":100
}

]


}


Request Packet Field Description

Field
Type
Attribute
Description
BattleId
String
Required
The ID of battle
OpType
String
Required
Set type: 1 for accumulate, 2 for overwrite setting
ScoreList
Array
Required
Set score list
RoomId
String
Required
Room ID
Score
Integer
Required
The score corresponding to the room

Example Of a Response Packet Body

Basic form
{
"ErrorCode": 0,
"ErrorInfo": "",
"ActionStatus": "OK",
"RequestId": "Id-e7625183568d4058bd48c9924d4b1ed7-O-Seq-125382",
"Response": {
"Result": [
{
"RoomId": "pk-3",
"ResultCode": 0
},
{
"RoomId": "pk-4",
"ResultCode": 0
}
]
}
}

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.
Result
Array
Operation Result
ResultCode
Integer
Result, 0 indicates successful setting, 1 indicates a non-existent room.
RoomId
String
Room ID

Error Code Description

Unless a network error occurs (such as a 502 error), the HTTP return code for this API is always 200. The actual error code and error message are in the response packet body. Represented by `ErrorCode` and `ErrorInfo`.
Common error codes (60000 to 79999) refer to the Error Code document.
The private error codes of this API are as follows:
Error Code
Description
100001
Server internal error, please retry.
100002
The parameter is invalid. Check whether the request is correct according to the error description.
100006
The current PK has not started or has ended yet, and it is not allowed to set the score again.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support