tencent cloud

Mobile Live Video Broadcasting

Get Relay Room List

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-09-02 16:39:05
Diterjemahkan oleh AI

Overview

This API queries the relay relationship of a specified room, including its relay role (normal room / main room / sub-room), bound main room ID (when it is a sub-room), or sub-room list (when it is a main room).
Use Cases
Status Query: Check whether a room is currently involved in a relay relationship.
Operations Monitoring: Inspect which sub-rooms are currently bound to a main room.

Request URL

Example

https://xxxxxx/v4/live_engine_http_srv/get_relay_room_list?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_relay_room_list
Get Relay Room List API.
sdkappid
You can obtain the SdkAppId from 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

200 requests per second.

Request Parameters

The request body must be in JSON format.

Request Example

{
"RoomId": "main-room-001"
}

Field Descriptions

Field
Type
Required
Description
RoomId
String
Yes
Room ID to query. Can be a main room, sub-room, or normal room.

Response Parameters

When the API returns HTTP 200, check the ErrorCode in the response body to determine business logic success.

Main Room Response Example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"RequestId": "Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Response": {
"RelayRole": 1,
"RelayRoomList": [
{
"RoomId": "child-room-001",
"RelayTime": 1713868800
},
{
"RoomId": "child-room-002",
"RelayTime": 1713868860
}
]
}
}

Sub-room Response Example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"RequestId": "Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Response": {
"RelayRole": 2,
"MainRoomId": "main-room-001"
}
}

Normal Room Response Example

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"RequestId": "Id-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"Response": {
"RelayRole": 0
}
}

Field Descriptions

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.RelayRole
Integer
Relay role of the room:
0: Normal room (not involved in relay);
1: Main room (content source);
2: Sub-room (content receiver).
Response.MainRoomId
String
Returned when RelayRole = 2 (sub-room). The main room ID this sub-room is bound to.
Response.RelayRoomList
Array
Returned when RelayRole = 1 (main room). List of all sub-rooms bound to this main room.
Response.RelayRoomList[i].RoomId
String
Sub-room ID.
Response.RelayRoomList[i].RelayTime
Integer
Timestamp (Unix seconds) when this sub-room was added as a relay sub-room.

RelayRole Enum Values

Value
Name
Description
0
None
Normal room, not involved in any relay relationship.
1
Main
Main room, serves as content source; its mixed stream is relayed to sub-rooms.
2
Sub
Sub-room, receives the main room's mixed stream relay. Cannot connect, take seat, or PK.

Error Codes

For common error codes (60000 to 79999), refer to the Error Codes documentation. The following are the private error codes specific to this API:
Error Code
Description
100001
Internal server error. Please retry.
100002
Invalid request parameters. Common cause: RoomId is empty.
100004
Room does not exist.
100006
Permission denied. Common cause: not a REST API call (client SDK not allowed).

Reference

Create Room: Create main rooms and sub-rooms.
Add Relay Sub-rooms: Set rooms as relay sub-rooms.
Remove Relay Sub-rooms: Remove sub-rooms from the main room.
Dismiss Room: Relay relationships are automatically cleaned up when a room is dismissed.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan