connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Pagpapatotoo
Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na connections.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.
Kung saan mapupunta ang id ng iyong organisasyon
Tinatanggap ng endpoint na ito ang org_id bilang parameter ng query. Huwag itong isama at saklaw ng tawag ang buong subtree ng iyong tenancy; ipadala ito para paliitin ang tawag sa isang organisasyon.
Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.
Subukan ito
Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API
Mga Detalye
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`.
Mga Parameter
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
provider (path) | ConnectionProvider | Oo | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Hindi | 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 | Hindi | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Tugon
| Pangalan | Uri | Kailangan | Ano ito |
|---|---|---|---|
valid | boolean | Oo | — |
account_login | object | Oo | The account the token authenticates as, when valid. |
scopes | string[] | Oo | — |
missing_scopes | string[] | Oo | 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 | Oo | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Hindi | 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… |
Mga error na maibabalik ng endpoint na ito
401 · 403 · 422 · 429 · 503