# 查询项目的频道列表 (/zh-CN/api-reference/api-ref/rtc/query-channel-list)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

按页查询指定项目下的频道列表。

- OpenAPI: /openapi/rtc/channel-management.zh-CN.yaml
- Operation ID: get-dev-v1-channel-appid
- Method: GET
- Path: /dev/v1/channel/{appid}
- Endpoint: https://api.sd-rtn.com/dev/v1/channel/{appid}

## Servers

- https://api.sd-rtn.com

你可以在请求路径中指定要查询的页面和每页显示的频道数量。请求成功后，会根据你指定的 `page_size` 返回指定页面的频道列表。


:::info[注意]
如果频道内的人数频繁变化，查询结果可能不准确，可能会出现同一频道重复出现在不同分页中，或者某一频道未出现在任何分页中的情况。
:::

## Authorization

This endpoint requires authentication.

- `Basic Auth`

## Parameters

- `page_no` (query, optional, number) - 你想要查询的页面，默认值为 `0`，即第一页。
- `page_size` (query, optional, number) - 个页面显示的频道数量，取值范围为 [1,500]，默认值为 `100`。
- `appid` (path, required) - 项目的 App ID。可通过以下方式获取：
- 从声网控制台获取。
- 调用[获取所有项目信息 API](/zh-CN/api-reference/api-ref/console/list-projects)，并读取响应包体中 `vendor_key` 字段的值。

## Request body

No request body.

## Responses

### 200

如果状态码为 200，则请求成功。

- `success` (boolean) - 本次请求的状态：
- `true`：请求成功
- `false`：预留
- `data` (object) - 频道数据。
  - `data.channels` (array) - 频道列表。由多个 object 组成，每个 object 表示一个频道的信息。

注意：指定的页面不包含频道列表时，该字段返回值为空。
    - `data.channels.items` (object)
      - `data.channels.items.channel_name` (string) - 频道名。
      - `data.channels.items.user_count` (number) - 频道内的用户人数。
  - `data.total_size` (number) - 频道总数。
### 非 200

如果状态码不为 200，则请求失败。你可以参考[响应状态码](/zh-CN/realtime-media/rtc/reference/response-code)排查问题。

No schema.

## Response examples

### 200

```json
{
  "success": true,
  "data": {
    "channels": [
      {
        "channel_name": "频道名。",
        "user_count": 0
      }
    ],
    "total_size": 0
  }
}
```
