Query channel list
https://api.agora.io/dev/v1/channel/{appid}Use this endpoint to get the list of all channels under a specified project. The channel list is returned by page; specify the page number and page size in the request URL.
If the number of users in a channel changes frequently, the query results may be inaccurate. The following situations may occur:
- A channel appears repeatedly on different pages.
- A channel does not appear on any page.
Request
The request URL and request body is case-sensitive. All requests must use HTTPS.
Request header
Content-Type:application/json- The request header must contain the
Authorizationfield. For details, see RESTful authentication.
Path parameters
The App ID of the project. You can get it through one of the following methods:
- Copy from the Agora Console
- Call the Get all projects API, and read the value of the
vendor_keyfield in the response body.
Query parameters
QUERY
- page_no numbernullable
Default:
0The page number to query. The default value is
0, which is the first page. The value ofpage_nocannot exceed(total number of channels / page_size) - 1; otherwise, the specified page contains no channels.
Response
A 200 status code indicates success. The response body contains the following parameters:
OK
- success boolean
The state of this request:
true: Success.false: Reserved for future use.
- data object
Channel statistics.
Show propertiesHide properties
- channels array
The list of channels. Each object in the array represents one channel and contains the following fields. If the specified page contains no channels, this field is empty.
Show propertiesHide properties
- channel_name string
The channel name.
- user_count number
The total number of users in the channel.
- total_size number
The total number of channels under the specified project.
If the status code is not 200, the request fails. See the message field in the response body for the reason for this failure. Refer to Response status codes for details.