All Products
Search
Document Center

ApsaraVideo Live:DescribeChannelUsers

Last Updated:Dec 05, 2024

Queries the details of online users in a channel.

Operation description

You can call this operation to query information about online users in a channel, such as the total number of users during live streaming.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped and you may experience service interruptions. We recommend that you take note of this limit when you call this operation.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
live:DescribeChannelUserslist
*Rtc
acs:live::{#accountId}:rtc/{#AppId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
AppIdstringYes

The application ID. You can specify only one application ID in a request.

aec****
ChannelIdstringYes

The channel ID. You can specify only one channel ID in a request.

testId

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The ID of the request.

AD86847D-1F36-18C8-A995-5EEA340B3202
Timestamplong

The UTC timestamp when the response is returned.

1691027655
IsChannelExistsboolean

Indicates whether the channel exists. Valid values:

  • true
  • false
Note After all users leave the channel, the system requires a few seconds to clear the cache. If you call the operation during this period, the value of this parameter is true, and the value of InteractiveUserNumber and LiveUserNumber is 0.
true
InteractiveUserNumberinteger

The number of co-streamers.

1
LiveUserNumberinteger

The number of viewers.

1
InteractiveUserListarray

The list of streamers/co-streamers.

InteractiveUserstring

Interactive user list.

aaa
LiveUserListarray

The list of viewers.

LiveUserstring

Viewer list, up to 1000 people returned.

bbb

Examples

Sample success responses

JSONformat

{
  "RequestId": "AD86847D-1F36-18C8-A995-5EEA340B3202",
  "Timestamp": 1691027655,
  "IsChannelExists": true,
  "InteractiveUserNumber": 1,
  "LiveUserNumber": 1,
  "InteractiveUserList": [
    "aaa"
  ],
  "LiveUserList": [
    "bbb"
  ]
}

Error codes

HTTP status codeError codeError message
400400InvalidInput
401401InvalidAuth
404404AppOrChannelNotExists
500500SystemError, Please Check App And Channel Exists, RETRY

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-31The Error code has changedView Change Details