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> |
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 OKResponse 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. |
poll_interval_seconds | integer | Recommended polling interval. |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | channel_type_unsupported | Channel type does not support QR sessions. |
| 404 | not_found_error | channel_not_found | Channel does not exist. |
| 409 | conflict_error | channel_disabled | Channel is disabled. |
| 502 | api_error | channel_auth_failed | Third-party channel authorization failed. |
Notes
- QR sessions currently support
wechat,feishu,dingtalk, andwecom. qqdoes not currently support the unified QR session flow.- The request body may be omitted or
{}.