DescribeChannelUsers
Queries the list of real-time online users in a channel.
Operation description
Usage notes
This operation queries the details of online users in a channel. For example, you can query the total number of users in communication mode and live streaming mode.
QPS limit
The queries per second (QPS) limit for a single user is 100 calls per second. If the limit is exceeded, API calls are throttled, which may affect your services. Call the operation at a reasonable frequency. For more information, see QPS limits.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The application ID. You can create and query the ID in the console. Only a single ID is supported. |
a2hz**** |
| ChannelId |
string |
Yes |
The ID of the channel to query. Only a single ID is supported. |
testId |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| CommTotalNum |
integer |
The total number of users in the channel in communication mode. If the channel is not in communication mode, this parameter is 0. |
100 |
| RequestId |
string |
The request ID. |
6159ba01-6687-4fb2-a831-f0cd8d188648 |
| IsChannelExist |
boolean |
Indicates whether the channel exists. Valid values:
|
true |
| LiveUserNum |
integer |
The total number of viewers in the channel in live streaming mode. If the channel is not in live streaming mode, this parameter is 0. |
0 |
| Timestamp |
integer |
The timestamp of the current time in UTC. |
1557909133 |
| ChannelProfile |
integer |
The channel mode. Valid values:
|
1 |
| InteractiveUserNum |
integer |
The total number of interactive users in the channel in live streaming mode. If the channel is not in live streaming mode, this parameter is 0. |
0 |
| UserList |
array |
The list of user IDs in the channel in communication mode. This parameter is empty if the channel is not in communication mode. |
|
|
string |
The list of users in the channel in communication mode. This parameter is empty if the channel is not in communication mode. |
[] |
|
| InteractiveUserList |
array |
The list of interactive user IDs in the channel in live streaming mode. This parameter is empty if the channel is not in live streaming mode. |
|
|
string |
The list of interactive users in the channel in live streaming mode. This parameter is empty if the channel is not in live streaming mode. |
["4455****", "3267****", "efbc****"] |
|
| LiveUserList |
array |
The list of viewer IDs in the channel in live streaming mode. A maximum of 1,000 viewers are returned. This parameter is empty if the channel is not in live streaming mode. |
|
|
string |
The list of viewers in the channel in live streaming mode. Only the first 1,000 viewers are returned. This parameter is empty if the channel is not in live streaming mode. |
["4455****", "3267****", "efbc****"] |
Examples
Success response
JSON format
{
"CommTotalNum": 100,
"RequestId": "6159ba01-6687-4fb2-a831-f0cd8d188648",
"IsChannelExist": true,
"LiveUserNum": 0,
"Timestamp": 1557909133,
"ChannelProfile": 1,
"InteractiveUserNum": 0,
"UserList": [
"[]"
],
"InteractiveUserList": [
"[\"4455****\", \"3267****\", \"efbc****\"]"
],
"LiveUserList": [
"[\"4455****\", \"3267****\", \"efbc****\"]"
]
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | request.norequestid | no request | |
| 400 | request.noaliuid | no aliuid | |
| 400 | request.noappid | no appid | |
| 400 | request.nochannelid | no channelid | |
| 400 | service.signalrequesterror | signal request error | |
| 401 | request.illegalauth | illegal auth | |
| 401 | request.authinvalid | auth invalid | |
| 500 | service.signalrequesterror | signal send msg error |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.