connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Klucz musi posiadać uprawnienie connections.manage; klucz bez niego jest odrzucany z kodem 403, a nie 404.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
provider (path) | ConnectionProvider | Tak | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Nie | 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 | Nie | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
valid | boolean | Tak | — |
account_login | object | Tak | The account the token authenticates as, when valid. |
scopes | string[] | Tak | — |
missing_scopes | string[] | Tak | 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 | Tak | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Nie | 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… |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422 · 429 · 503