connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Uthibitishaji
Tuma ufunguo wa API kama tokeni ya kubeba. Ufunguo lazima uwe na ruhusa ya connections.manage; ufunguo usio nayo unakataliwa kwa 403, si 404.
Mahali ambapo kitambulisho cha shirika lako huwekwa
Kigezo hiki kinachukua org_id kama kigezo cha utafutaji. Iache wazi na simu itashughulikia tawi lako lote la wapangaji; itume ili kupunguza simu iwe ya shirika moja tu.
Kitambulisho cha shirika lako kipo kwenye skrini ya funguo za API katika dashibodi yako, kando ya ufunguo wenyewe. Ni kitambulisho kile kile katika kila ombi unalofanya.
Jaribu
Badilisha chochote kilicho ndani ya mabano ya pembe na maadili yako mwenyewe, na kishikiliaji cha ufunguo na ufunguo kutoka kwa dashibodi yako.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Umeingia kwenye akaunti? Dashibodi yako ya kiweko cha API inajaza kitambulisho chako halisi cha shirika na ufunguo wako mwenyewe, na kuendesha ombi dhidi ya API ya moja kwa moja ili uweze kuona jibu halisi. Fungua sehemu hii ya mwisho (endpoint) kwenye konsole ya API
Maelezo
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`.
Vigezo
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
provider (path) | ConnectionProvider | Ndiyo | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Hapana | 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 | Hapana | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Majibu
| Jina | Aina | Inayohitajika | Kilicho hiki |
|---|---|---|---|
valid | boolean | Ndiyo | — |
account_login | object | Ndiyo | The account the token authenticates as, when valid. |
scopes | string[] | Ndiyo | — |
missing_scopes | string[] | Ndiyo | 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 | Ndiyo | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Hapana | 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… |
Hitilafu ambazo mwisho huu unaweza kurudisha
401 · 403 · 422 · 429 · 503