Skip to main content
Channels

チャネル QR セッションの作成

Channel 向けの短時間有効な QR 認可セッションを作成します。

POST /api/v1/forward/channels/{channel_id}/qr_sessions 対応するチャネルをアクティベートまたは再バインドできる QR セッションを作成します。

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT または SAT>
Content-TypeNoボディを送信する場合は application/json
Idempotency-KeyNo安全でないリクエスト向けの任意のべき等性キー。

Path parameters

ParameterTypeRequiredDescription
channel_idstringYesチャネル 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_keystringポーリングに使用する不透明な QR セッションキー。
channel_idstring関連付けられた Channel ID。
channel_typestringwechatfeishudingtalk、または wecom
statusstring初期ステータス。通常は waiting
qr_code_contentstring元の QR コンテンツ。通常はサードパーティの認可 URL。
qr_code_image_base64stringサービスが生成した QR 画像。
expires_atstring有効期限のタイムスタンプ。

Error codes

HTTPTypeTrigger
400invalid_request_errorチャネルタイプが QR セッションをサポートしていません。
401authentication_errorPAT または SAT が無効または期限切れです。
404not_found_errorChannel が存在しません。
409conflict_errorChannel が無効になっています。
502api_errorサードパーティチャネルの認可に失敗しました。

Notes

  • QR セッションは現在 wechatfeishudingtalkwecom をサポートしています。
  • リクエストボディは省略するか {} にできます。