connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Autentikasi
Kirim kunci API sebagai token bearer. Kunci tersebut harus memiliki izin connections.manage; kunci tanpa izin tersebut akan ditolak dengan status 403, bukan 404.
Tempat ID organisasi Anda dimasukkan
Titik akhir ini menerima org_id sebagai parameter kueri. Kosongkan parameter tersebut dan panggilan ini akan mencakup seluruh subpohon penyewa Anda; kirimkan untuk mempersempit panggilan ke satu organisasi.
ID organisasi Anda berada di layar kunci API di dasbor Anda, di sebelah kunci itu sendiri. Itu adalah ID yang sama dalam setiap panggilan yang Anda buat.
Coba
Ganti apa pun di dalam tanda kurung sudut dengan nilai Anda sendiri, dan placeholder kunci dengan kunci dari dasbor Anda.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Sudah masuk? Konsol API di dasbor Anda akan mengisi ID organisasi asli dan kunci Anda sendiri, serta menjalankan permintaan terhadap API langsung sehingga Anda dapat melihat respons aktualnya. Buka titik akhir ini di konsol API
Detail
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`.
Parameter
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
provider (path) | ConnectionProvider | Ya | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Tidak | 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 | Tidak | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Tanggapan
| Nama | Jenis | Wajib | Tentang apa ini |
|---|---|---|---|
valid | boolean | Ya | — |
account_login | object | Ya | The account the token authenticates as, when valid. |
scopes | string[] | Ya | — |
missing_scopes | string[] | Ya | 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 | Ya | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Tidak | 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… |
Kesalahan yang dapat dikembalikan oleh titik akhir ini
401 · 403 · 422 · 429 · 503