connections
POST /v1/connections/{provider}
Validate or store a provider access token.
認証
ベアラー トークンとして API キーを送信します。キーには connections.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。
組織 ID を入力する場所
このエンドポイントはクエリパラメータとして org_id を受け取ります。省略した場合はテナントサブツリー全体が対象になり、指定した場合は特定の組織のみに絞り込まれます。
組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。
試してみる
アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く
詳細
With `validate_only` the token is checked and nothing is stored, and the result is returned with 200 **even when the token is invalid** — an invalid token is an answer the caller renders, not a request error. Without it the token is re-validated and then stored in Vault, returning 201; a token that fails validation is rejected with `TOKEN_INVALID` and never persisted. The token itself is never logged or echoed. Requires `connections.manage`.
パラメータ
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
provider (path) | ConnectionProvider | はい | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | いいえ | Which organization this connected account belongs to. Required when the caller manages connections for more than one — a reseller or an agency by construction — because a creden… |
Idempotency-Key (header) | string | いいえ | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
valid | boolean | はい | — |
account_login | object | はい | The account the token authenticates as, when valid. |
scopes | string[] | はい | — |
missing_scopes | string[] | はい | Required scopes the token lacks. Empty when the token is valid, and also empty when the provider could not enumerate its permissions — in that case the connection is usable but… |
message | object | はい | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | いいえ | The per-permission checklist, exercised against the provider. ⛔ `null` means **we cannot test this provider's permissions** — it does not mean "nothing is required". The two rea… |
このエンドポイントが返すエラー
401 · 403 · 422 · 429 · 503