提交工单
咨询集成、功能及报价等问题
Get the list of users in a room.
Listed below are the parameters specific to this request and part of the public request parameters. For the complete list of public request parameters, see Server APIs public request parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
RoomId |
String |
Yes |
Room ID. If the room does not exist, an empty list will be returned. |
Mode |
Int32 |
No |
The default value for sorting the login time of users in a room is 0.
|
Limit |
Int32 |
No |
The number of users returned in a single request, ranging from 0 to 200. This means that a maximum of 200 users can be returned in one call to this interface. The default value is 200. If the number of users in the room exceeds 200, you need to use the Marker value (user starting position identifier) from the previous call to this interface to make another call and query the remaining users.
For example, if there are 450 users in the room and you call this interface to query the user list:
|
Marker |
String |
No |
Query the user start bit identifier, the response of each request is returned, if it is empty, the user information will be returned from the beginning. |
https://rtc-api.zego.im/?Action=DescribeUserList
&RoomId=room_demo
&Mode=0
&Limit=2
&Marker=
&<public Request Parameters>
| Parameter | Type | Description | |
|---|---|---|---|
Code |
Int32 |
Return code. |
|
Message |
String |
A Description of the operation result. |
|
RequestId |
String |
Request ID. |
|
Data |
Object |
Response data. |
|
Marker |
String |
User start bit identifier. |
|
UserList |
Array of Object |
User list. |
|
UserId |
String |
Username. |
|
UserName |
String |
User nickname. |
|
UserRole |
UInt32 |
User role.
This return parameter only has practical significance when accessing the LiveRoom service. Please ignore this parameter when accessing the Express service. |
{
"Code": 0,
"Message": "success",
"RequestId": "TestRequestId1635940600561291000",
"Data": {
"Marker": "1635940599950-user2",
"UserList": [
{
"UserId": "user1",
"UserName": "user1"
"UserRole": 1
},
{
"UserId": "user2",
"UserName": "user2"
"UserRole": 2
}
]
}
}
Please refer to Return codes.
