Skip to main content
GET
查询微信扫码会话
沿用 Channel API 的 Bearer 认证、zai-version: 2026-05-26 和 zai-beta: managed-agents-2026-05-26;多个 beta 值用逗号分隔且必须包含此值。发送 JSON 时设 Content-Type: application/json。扫码 POST / GET 分别计入 write / read 限流。

状态与响应字段

正常状态流为 waiting → scanned → confirmed;也可能过期(expired)、被拒绝(denied)或出错(error)。scanned 只表示已扫码,不表示确认成功。由计划绑定的微信用户扫码并在手机确认,轮询到 confirmed 后,再调用获取 Channel确认 binding_status=bound 与 connection_status=connected。 新建二维码使旧扫码会话失效;已有绑定以服务端确认状态为准。重建 WeChat Channel 后必须重新扫码,不能导入旧 bot token,也不能绕过微信安全验证。二维码只交给计划绑定账号的持有人,不要发送到群聊或共享文档。响应示例使用确认后的终态,不包含真实二维码。

请求示例

重新创建扫码会话;完整流程见接入个人微信。

Authorizations

Authorization
string
header
required

标准的 HTTP Bearer 认证方式,在 API Keys 页面获取密钥。

Headers

zai-version
enum<string>
default:2026-05-26
required

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

Available options:
2026-05-26
Example:

"2026-05-26"

zai-beta
string
default:managed-agents-2026-05-26
required

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

Example:

"managed-agents-2026-05-26"

Path Parameters

channelId
string
required

当前账号的 WeChat Channel ID。

Example:

"channel_wechat_xxx"

session_key
string
required

本 Channel 扫码会话 ID。

Example:

"chqr_xxx"

Response

扫码会话详情。

type
enum<string>
required

固定资源类型。

Available options:
channel_qr_session
session_key
string
required

扫码会话 ID。

Example:

"chqr_xxx"

channel_id
string
required

所属 Channel。

Example:

"channel_wechat_xxx"

provider
enum<string>
required

固定 wechat。

Available options:
wechat
status
enum<string>
required

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

Available options:
waiting,
scanned,
confirmed,
expired,
denied,
error
qr_code
string | null
required

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

expires_at
string<date-time>
required

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

confirmed_at
string<date-time> | null
required

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

created_at
string<date-time>
required

创建时间。

updated_at
string<date-time>
required

更新时间。

error
object | null

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