connections

POST /v1/connections/{provider}

Validate or store a provider access token.

Semua titik akhir connections

Pengesahan

Hantar kunci API sebagai token pembawa. Kunci tersebut mesti membawa kebenaran connections.manage; kunci yang tidak mempunyainya akan ditolak dengan 403, bukan 404.

Tempat ID organisasi anda diletakkan

Titik akhir ini mengambil org_id sebagai parameter pertanyaan. Biarkan ia kosong dan panggilan tersebut meliputi keseluruhan subpohon penyewaan anda; hantarkannya untuk mengecilkan panggilan kepada satu organisasi.

ID organisasi anda terletak pada skrin kekunci API dalam papan pemuka anda, di sebelah kekunci itu sendiri. Ia adalah ID yang sama dalam setiap panggilan yang anda buat.

Cuba

Gantikan apa sahaja di dalam kurungan sudut dengan nilai anda sendiri, dan pemegang tempat kunci dengan kunci dari papan pemuka anda.

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

Sudah log masuk? Konsol API dalam papan pemuka anda mengisi id organisasi sebenar dan kunci anda sendiri, serta menjalankan permintaan terhadap API langsung supaya anda boleh melihat respons sebenar. Buka penamat ini dalam konsol API

Butiran

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

NamaJenisDiperlukanApakah ia
provider (path)ConnectionProviderYaThe third-party provider whose connections are addressed.
org_id (query)UuidTidakWhich 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)stringTidakClient-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats.

Respons

NamaJenisDiperlukanApakah ia
validbooleanYa
account_loginobjectYaThe account the token authenticates as, when valid.
scopesstring[]Ya
missing_scopesstring[]YaRequired 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…
messageobjectYaHuman-readable explanation, or null when valid.
permissionsPermissionReport | nullTidakThe 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…

Ralat yang boleh dikembalikan oleh titik akhir ini

401 · 403 · 422 · 429 · 503