connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Автентифікація
Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл connections.manage; ключ без нього відхиляється з кодом 403, а не 404.
Де вказується ідентифікатор вашої організації
Цей ендпоїнт приймає org_id як параметр запиту. Залиште його порожнім, і виклик охопить увесь ваше дерево орендарів; надішліть його, щоб звузити виклик до однієї організації.
Ідентифікатор вашої організації знаходиться на екрані API-ключів у вашій панелі керування, поруч із самим ключем. Це той самий ідентифікатор у кожному вашому запиті.
Спробувати
Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого 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