Create a short-lived QR authorization session for a Channel.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
No |
|
|
|
No |
Optional idempotency key for unsafe requests. |
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Channel ID. |
Example request
curl -s -X POST 'https://api.qoder.com.cn/api/v1/forward/channels/ci_dingtalk_001/qr_sessions' \
-H "Authorization: Bearer $QODER_PAT" \
-H "Content-Type: application/json" \
-d '{}'
Example response
HTTP 200 OK
{
"type": "channel_qr_session",
"session_key": "qr-a1b2c3d4",
"channel_id": "ci_dingtalk_001",
"channel_type": "dingtalk",
"status": "waiting",
"qr_code_content": "https://login.dingtalk.com/oauth2/...",
"qr_code_image_base64": "data:image/png;base64,...",
"expires_at": "2026-06-18T10:05:00Z",
"poll_interval_seconds": 3
}
Response fields
|
Field |
Type |
Description |
|
|
string |
Always |
|
|
string |
Opaque QR session key used for polling. |
|
|
string |
Associated Channel ID. |
|
|
string |
|
|
|
string |
Initial status, usually |
|
|
string |
Original QR content, usually a third-party authorization URL. |
|
|
string |
QR image generated by Gateway. |
|
|
string |
Expiration timestamp. |
|
|
integer |
Recommended polling interval. |
Errors
|
HTTP |
Type |
Code |
Trigger |
|
400 |
|
|
Channel type does not support QR sessions. |
|
404 |
|
|
Channel does not exist. |
|
409 |
|
|
Channel is disabled. |
|
502 |
|
|
Gateway or third-party authorization failed. |
Notes
-
P0 QR sessions support
wechat,feishu,dingtalk, andwecom. -
qqdoes not support unified QR sessions in P0. -
The request body may be omitted or
{}.