Channel

查询微信扫码会话

查询当前账号、本 Channel 的公开微信扫码会话。成功返回 200;会话不属于当前账号或指定 Channel 时返回 404。

get/agent/forward/v0/channels/{channelId}/qr-sessions/{session_key}

Request

  • Base URL
    https://agent-api.bigmodel.cn/api
  • Auth
    HTTP bearer

Path parameters

channelIdstring required
Example:channel_wechat_xxx

当前账号的 WeChat Channel ID。

session_keystring required
Example:chqr_xxx

本 Channel 扫码会话 ID。

Headers

zai-version'2026-05-26' required
Example:2026-05-26

Channel API v0 基础协议标识,固定为 2026-05-26。

zai-betastring required
Example:managed-agents-2026-05-26

可有多个逗号分隔值,但必须包含 managed-agents-2026-05-26。

Response

扫码会话详情。

type'channel_qr_session' required

固定资源类型。

session_keystring required

扫码会话 ID。

channel_idstring required

所属 Channel。

provider'wechat' required

固定 wechat。

status'waiting' | 'scanned' | 'confirmed' | 'expired' | 'denied' | 'error' required

scanned 只表示已扫码;confirmed 表示手机端确认成功,仍需查询 Channel 状态。

qr_codestring nullable required

PNG data URL,仅有效 waiting/scanned 状态返回;终态或过期为 null。不要公开到群聊或共享文档。

expires_atstring date-time required

约 8 分钟,以此过期时间为准。

confirmed_atstring date-time nullable required

确认时间,未确认时为 null。

created_atstring date-time required

创建时间。

updated_atstring date-time required

更新时间。

errorobject nullable

仅 error 状态可能返回的安全错误提示。

Example response

{
  "type": "channel_qr_session",
  "session_key": "chqr_xxx",
  "channel_id": "channel_wechat_xxx",
  "provider": "wechat",
  "status": "confirmed",
  "qr_code": null,
  "expires_at": "2026-10-30T00:08:00.000Z",
  "confirmed_at": "2026-10-30T00:01:00.000Z",
  "created_at": "2026-10-30T00:00:00.000Z",
  "updated_at": "2026-10-30T00:01:00.000Z"
}

Changes