All Products
Search
Document Center

Qoder CN Series:Create channel QR session

Last Updated:Jul 15, 2026

Create a short-lived QR authorization session for a Channel.

Request 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

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

type

string

Always channel_qr_session.

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 Gateway.

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

Gateway or third-party authorization failed.

Notes

  • P0 QR sessions support wechat, feishu, dingtalk, and wecom.

  • qq does not support unified QR sessions in P0.

  • The request body may be omitted or {}.