Skip to main content

列出 Channels

按条件分页列出外部 IM Channel。

请求头

Header是否必填说明
AuthorizationBearer <PAT>

查询参数

参数类型是否必填默认值说明
channel_typestring-wechatqqwecomfeishudingtalk 过滤。
enabledboolean-按人工启停状态过滤。
binding_statusstring-unboundboundexpired 过滤。
identity_idstring-按 Forward Identity ID 过滤。
template_idstring-按 Forward Template ID 过滤。
limitinteger20分页大小,最大 100。
after_idstring-向后翻页游标。
before_idstring-向前翻页游标。

示例请求

curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/channels' \
  -H "Authorization: Bearer $QODER_PAT"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "id": "ci_019eabc123",
      "type": "channel",
      "identity_id": "idn_019eabc123",
      "template_id": "tmpl_support",
      "channel_type": "feishu",
      "name": "Support Feishu channel",
      "enabled": true,
      "binding_status": "bound",
      "created_at": "2026-06-18T10:00:00Z",
      "updated_at": "2026-06-18T10:00:00Z"
    }
  ],
  "first_id": "ci_019eabc123",
  "last_id": "ci_019eabc123",
  "has_more": false
}

响应字段

字段

类型

说明

data

array

当前页的 Channel 对象。

first_id

string|null

当前页第一条 Channel ID。

last_id

string|null

当前页最后一条 Channel ID。

has_more

boolean

是否还有更多记录。

错误

HTTPTypeCode触发条件
400invalid_request_errorinvalid_pagination分页参数不合法。
400invalid_request_errorchannel_type_unsupported渠道类型过滤条件不支持。
401authentication_errorauthentication_requiredPAT 无效或已过期。

备注

  • after_idbefore_id 不能同时传入。
  • 只返回当前调用方账号边界内的 Channel。

相关