Create a short-lived QR authorization session for a Channel.
POST /api/v1/forward/channels/{channel_id}/qr_sessions
Creates a QR session that can activate or rebind supported channels.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT or SAT> |
Content-Type | No | application/json if a body is sent. |
Idempotency-Key | No | Optional idempotency key for unsafe requests. |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | Channel ID. |
Example request
Example response
HTTP 200 OK
Response fields
| Field | Type | Description |
|---|---|---|
session_key | string | Opaque QR session key used for polling. |
channel_id | string | Associated Channel ID. |
channel_type | string | wechat, feishu, dingtalk, or wecom. |
status | string | Initial status, usually waiting. |
qr_code_content | string | Original QR content, usually a third-party authorization URL. |
qr_code_image_base64 | string | QR image generated by the service. |
expires_at | string | Expiration timestamp. |
Error codes
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Channel type does not support QR sessions. |
| 401 | authentication_error | PAT or SAT is invalid or expired. |
| 404 | not_found_error | Channel does not exist. |
| 409 | conflict_error | Channel is disabled. |
| 502 | api_error | Third-party channel authorization failed. |
Notes
- QR sessions currently support
wechat,feishu,dingtalk, andwecom. - The request body may be omitted or
{}.