Retrieve channel list
Get
https://api.agora.io/dev/v1/channel/{appid}
This RESTful API lets you retrieve the list of available Video SDK channels by page. In the URL, you can specify the page number and the number of URLs on the page. On response, it returns the list of channels on the specified page according to the set page_size
.
Path parameters
- appidstringrequiredYour APP ID.
Body
- page_nonumberThe page number that you want to query. The default value is 0, that is, the first page. The value of page_no cannot exceed (the total number of channels/the value of page_size - 1); otherwise, the specified page does not contain any channel.
- page_sizenumberThe number of channels on a page. The value range is [1,500], and the default value is 100.
Response
- successbool
true
: Success.false
: Reserved for future use.
- dataobjectChannel statistics, including the following fields:
- channelsArrayThe list of channels. This array contains multiple objects. Each object shows the information on a channel and includes the following fields:
- channel_namestringThe channel name
- user_countnumberThe total number of users in the channel.
- total_sizenumberThe total number of channels under the specified project.
Authorization
This endpoint requires Basic Auth. Use your
Customer ID
as the username and Customer Secret
as the password.Request example
curl --request GET --url https://api.sd-rtn.com/dev/v1/channel/appid --header 'Accept: application/json' --header 'Authorization: '
Response example
{
"success": true,
"data": {
"channels": [
{
"channel_name": "lkj144",
"user_count": 3
}
],
"total_size": 1
}
}