connections

POST /v1/connections/{provider}

Validate or store a provider access token.

Tutti gli endpoint connections

Autenticazione

Invia una chiave API come token di tipo bearer. La chiave deve disporre dell'autorizzazione connections.manage; una chiave sprovvista di tale autorizzazione viene rifiutata con 403 anziché 404.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
  -H "Authorization: Bearer zdk_live_…"

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

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`.

Parametri

NomeTipoObbligatorioChe cos'è
provider (path)ConnectionProviderThe third-party provider whose connections are addressed.
org_id (query)UuidNoWhich 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)stringNoClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Risposta

NomeTipoObbligatorioChe cos'è
validboolean
account_loginobjectThe account the token authenticates as, when valid.
scopesstring[]
missing_scopesstring[]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…
messageobjectHuman-readable explanation, or null when valid.
permissionsPermissionReport | nullNoThe 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…

Errori che questo endpoint può restituire

401 · 403 · 422 · 429 · 503