POST /api/v1/forward/channels/{channel_id}/qr_sessions
対応するチャネルをアクティベートまたは再バインドできる QR セッションを作成します。
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <PAT> |
Content-Type | No | ボディを送信する場合は application/json。 |
Idempotency-Key | No | 安全でないリクエスト向けの任意のべき等性キー。 |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | チャネル ID。 |
Example request
Example response
HTTP 200 OKResponse fields
| Field | Type | Description |
|---|---|---|
session_key | string | ポーリングに使用する不透明な QR セッションキー。 |
channel_id | string | 関連付けられた Channel ID。 |
channel_type | string | wechat、feishu、dingtalk、または wecom。 |
status | string | 初期ステータス。通常は waiting。 |
qr_code_content | string | 元の QR コンテンツ。通常はサードパーティの認可 URL。 |
qr_code_image_base64 | string | サービスが生成した QR 画像。 |
expires_at | string | 有効期限のタイムスタンプ。 |
poll_interval_seconds | integer | 推奨されるポーリング間隔。 |
Errors
| HTTP | Type | Code | Trigger |
|---|---|---|---|
| 400 | invalid_request_error | channel_type_unsupported | チャネルタイプが QR セッションをサポートしていません。 |
| 404 | not_found_error | channel_not_found | Channel が存在しません。 |
| 409 | conflict_error | channel_disabled | Channel が無効になっています。 |
| 502 | api_error | channel_auth_failed | サードパーティチャネルの認可に失敗しました。 |
Notes
- QR セッションは現在
wechat、feishu、dingtalk、wecomをサポートしています。 qqは現在、統一された QR セッションフローをサポートしていません。- リクエストボディは省略するか
{}にできます。