Skip to main content
Channels

获取 Channel 配对

查询一条未绑定或已绑定的 Channel 配对记录。

Channel 配对目前为 Beta 功能,接口定义、响应结构和行为可能调整,请关注文档更新。
GET /api/v1/forward/channel_pairings/{pairing_id} 查询一条未绑定或已绑定的配对记录。

请求参数

使用 Authorization: Bearer <PAT 或 SAT>。路径参数 pairing_id 必填,为配对列表返回的 id。

示例请求

curl -s 'https://api.qoder.com.cn/api/v1/forward/channel_pairings/pair_019eabc123' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

HTTP 200 OK
{
  "id": "pair_019eabc123",
  "type": "channel_pairing",
  "channel_id": "channel_019eabc123",
  "scope_type": "direct",
  "scope_external_id": "external_user_id",
  "scope_display_name": "测试用户",
  "status": "active",
  "identity_id": "idn_019eabc123",
  "template_id": "tmpl_workspace_dev",
  "paired_at": "2026-09-09T08:00:00Z",
  "created_at": "2026-09-09T07:50:00Z",
  "updated_at": "2026-09-09T08:00:00Z"
}
scope_type 为 direct(私聊)或 room(群聊),scope_external_id 为对应的外部用户或群 ID。 未绑定时 status=pairing,identity_id、template_id、paired_at 为空字符串。配对码过期不改变此状态;接口不返回配对码。 scope_display_name 为用户昵称或群名,可为空,仅供展示。

HTTP 错误码

HTTPType触发条件
400invalid_request_errorpairing_id 为空白或含控制字符,或 Channel 非 pairing 模式。
401authentication_errorPAT 或 SAT 无效或已过期。
403permission_error无调用权限。
404not_found_error配对不存在、已解绑,或所属 Channel 不存在、已归档、不可访问。

相关接口