connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Autentizace
Zašlete API klíč jako nosný token (bearer token). Klíč musí mít oprávnění connections.manage; klíč bez něj je odmítnut s kódem 403, nikoli 404.
Sem patří ID vaší organizace
Tento koncový bod přijímá org_id jako parametr dotazu. Pokud ho vynecháte, volání pokryje celý podstrom vašeho nájemce; jeho odesláním volání zúžíte na jednu organizaci.
ID vaší organizace najdete na obrazovce API klíčů ve vašem přehledu, hned vedle samotného klíče. Je to stále stejné ID v každém volání, které provedete.
Vyzvednout
Nahraďte cokoli v závorkách vlastními hodnotami a zástupný symbol klíče klíčem z vašeho řídicího panelu.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Přihlášeni? Konzole API ve vašem dashboardu automaticky doplní vaše skutečné ID organizace i váš vlastní klíč a odešle požadavek na živé API, abyste viděli reálnou odpověď. Otevřete tento koncový bod v konzoli API
Podrobnosti
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`.
Parametry
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
provider (path) | ConnectionProvider | Ano | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Ne | 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 | Ne | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Odpověď
| Název | Typ | Požadováno | Co to je |
|---|---|---|---|
valid | boolean | Ano | — |
account_login | object | Ano | The account the token authenticates as, when valid. |
scopes | string[] | Ano | — |
missing_scopes | string[] | Ano | 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 | Ano | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Ne | 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… |
Chyby, které může tento koncový bod vrátit
401 · 403 · 422 · 429 · 503