Skip to main content
Channels

Create channel QR session

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

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>
Content-TypeNoapplication/json if a body is sent.
Idempotency-KeyNoOptional idempotency key for unsafe requests.

Path parameters

ParameterTypeRequiredDescription
channel_idstringYesChannel ID.

Example request

curl -s -X POST 'https://api.qoder.com/api/v1/forward/channels/channel_dingtalk-001/qr_sessions' \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Example response

HTTP 200 OK
{
  "session_key": "qr-a1b2c3d4",
  "channel_id": "channel_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"
}

Response fields

FieldTypeDescription
session_keystringOpaque QR session key used for polling.
channel_idstringAssociated Channel ID.
channel_typestringwechat, feishu, dingtalk, or wecom.
statusstringInitial status, usually waiting.
qr_code_contentstringOriginal QR content, usually a third-party authorization URL.
qr_code_image_base64stringQR image generated by the service.
expires_atstringExpiration timestamp.

Error codes

HTTPTypeTrigger
400invalid_request_errorChannel type does not support QR sessions.
401authentication_errorPAT or SAT is invalid or expired.
404not_found_errorChannel does not exist.
409conflict_errorChannel is disabled.
502api_errorThird-party channel authorization failed.

Notes

  • QR sessions currently support wechat, feishu, dingtalk, and wecom.
  • The request body may be omitted or {}.
Create channel QR session - Qoder