Skip to main content
POST /api/v1/forward/channels/{channel_id}/qr_sessions Creates a QR session that can activate or rebind supported channels.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
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_PAT" \
  -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",
  "poll_interval_seconds": 2
}

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.
poll_interval_secondsintegerRecommended polling interval.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorchannel_type_unsupportedChannel type does not support QR sessions.
404not_found_errorchannel_not_foundChannel does not exist.
409conflict_errorchannel_disabledChannel is disabled.
502api_errorchannel_auth_failedThird-party channel authorization failed.

Notes

  • QR sessions currently support wechat, feishu, dingtalk, and wecom.
  • qq does not currently support the unified QR session flow.
  • The request body may be omitted or {}.

Get channel QR session

Get a channel