跳转到主要内容
GET /api/v1/forward/qr_sessions/{session_key} 返回 QR 授权会话的当前状态。

请求头

Header是否必填说明
AuthorizationBearer <PAT>

路径参数

参数类型是否必填说明
session_keystringCreate Channel QR Session 返回的不透明 session key。

示例请求

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

示例响应

HTTP 200 OK
{
  "session_key": "qr-a1b2c3d4",
  "channel_id": "channel_dingtalk-001",
  "channel_type": "dingtalk",
  "status": "confirmed",
  "expires_at": "2026-06-18T10:05:00Z"
}

响应字段

字段类型说明
statusstringwaitingscannedconfirmedexpireddeniederror
channel_idstring关联的 Channel ID。
err_codestring | null失败时的渠道错误码。
err_msgstring | null失败时的渠道错误信息。

错误

HTTPTypeCode触发条件
404not_found_errorchannel_qr_session_not_foundQR session 不存在、已过期或当前调用方不可见。
401authentication_errorauthentication_requiredPAT 无效或已过期。

注意事项

  • session_key 是短生命周期的不透明凭证。
  • 按创建响应中的 poll_interval_seconds 轮询。
  • 状态为 confirmed 后应刷新 Channel 详情。

相关

创建 Channel QR Session

获取 Channel