tencent cloud

Mobile Live Video Broadcasting

Get Room Statistics

ダウンロード
フォーカスモード
フォントサイズ
最終更新日: 2026-06-10 14:54:27

Feature Overview

This API enables you to retrieve statistics for a specific room, including total viewers, gift data, likes data, and message count.
Use Cases
Operations Console: Aggregate interaction data for a specific room.

Request URL

Example

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

Query Parameters

The table below lists only the parameters relevant to this API call and their descriptions. For more details, refer to the REST API Overview.
Parameter
Description
xxxxxx
The reserved domain for the country/region where the SDKAppID is located:
Others in China: console.tim.qq.com
Singapore: adminapisgp.im.qcloud.com
Silicon Valley: adminapiusa.im.qcloud.com
Jakarta: adminapiidn.im.qcloud.com
v4/live_engine_http_srv/get_room_stats
Get Room Statistics API.
sdkappid
You can register it on your application's card page in the Tencent RTC console.
identifier
Must be an application admin account. For details, see Application Administrator.
usersig
Signature generated for the application admin account. For instructions, see Generate UserSig.
random
Random 32-bit unsigned integer, range 0 - 4294967295.
contenttype
Request format, fixed value json.

Rate Limits

100 requests per second.

Request Parameters

The request body must be in JSON format.

Example

{
"RoomId": "live-room"
}

Parameter Details

Field
Type
Required
Description
RoomId
String
Required
Unique room identifier. Up to 48 bytes.

Response Parameters

When the API returns HTTP 200, use the ErrorCode in the response body to determine whether the request was successful.

Success Response Example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"RequestId": "Id-8c9858f01e954611ae2d4c1b1ed7d583-O-Seq-52720",
"Response": {
"TotalViewers": 1024,
"TotalGiftsSent": 56,
"TotalGiftCoins": 8800,
"TotalUniqueGiftSenders": 12,
"TotalLikesReceived": 3200,
"TotalMsgCount": 450
}
}

Parameter Details

Field
Type
Description
ActionStatus
String
Result of the request:
OK: success.
FAIL: failure.
ErrorCode
Integer
Error code:
0: success.
Non-zero: failure.
ErrorInfo
String
Error message.
RequestId
String
Unique request ID. Provide this RequestId for troubleshooting.
Response
Object
Room statistics object. See Response fields below.

Response Fields

Field
Type
Description
TotalViewers
Integer
Total number of viewers (cumulative).
TotalGiftsSent
Integer
Total number of gifts received.
TotalGiftCoins
Integer
Total gift coin value received.
TotalUniqueGiftSenders
Integer
Total number of unique gift senders.
TotalLikesReceived
Integer
Total number of likes received.
TotalMsgCount
Integer
Total number of messages.

Error Codes

For general error codes (60000 to 79999), see the Error Codes. The following are API-specific error codes:
Error Code
Description
100001
Internal server error. Please retry.
100002
Invalid request parameters. Check the error description and verify your request.
100004
Room does not exist. Please verify the Room ID.

Usage Examples

Scenario: Post-Stream Data Dashboard

Request Example
{
"RoomId": "live_testA"
}
Success Response Example
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"RequestId": "Id-abc123def456-O-Seq-10001",
"Response": {
"TotalViewers": 5680,
"TotalGiftsSent": 234,
"TotalGiftCoins": 46800,
"TotalUniqueGiftSenders": 89,
"TotalLikesReceived": 12500,
"TotalMsgCount": 1830
}
}


ヘルプとサポート

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

フィードバック