connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Autentifikatsiya
API kalitini bearer token sifatida yuboring. Kalit connections.manage ruxsatiga ega boʻlishi shart; ruxsatsiz kalit 404 emas, balki 403 xatosi bilan rad etiladi.
Tashkilotingiz identifikatori kiritiladigan joy
Bu soʻrovnoma oxiri org_id parametrini soʻrov parametri sifatida qabul qiladi. Uni kiritmasangiz, chaqiruv butun ijarachi quyi daraxtingizni qamrab oladi; uni bitta tashkilotga cheklash uchun yuboring.
Tashkilotingiz identifikatori boshqaruv panelingizdagi API kalitlari ekranida, kalitning o'z yonida joylashgan. Bu siz amalga oshiradigan har bir so'rovda bir xil identifikator hisoblanadi.
Sinab ko'rish
Qavslardagi har qanday narsani o'z qiymatlaringiz bilan, kalit pleysxolderini эsa boshqaruv panelingizdagi kalit bilan almashtiring.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Tizimga kirganmisiz? Boshqaruv panelingizdagi API konsoli haqiqiy tashkilot ID raqamingiz va shaxsiy kalitingizni avtomatik to'ldiradi hamda haqiqiy javobni ko'rishingiz uchun so'rovni jonli API orqali bajaradi. Ushbu yakuniy nuqtani API konsolida oching
Tafsilotlar
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`.
Parametrlar
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
provider (path) | ConnectionProvider | Ha | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | Yo'q | 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 | Yo'q | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
Javob
| Nomi | Turi | Majburiy | Nima bu |
|---|---|---|---|
valid | boolean | Ha | — |
account_login | object | Ha | The account the token authenticates as, when valid. |
scopes | string[] | Ha | — |
missing_scopes | string[] | Ha | 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 | Ha | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | Yo'q | 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… |
Ushbu yakuniy nuqta qaytarishi mumkin bo'lgan xatolar
401 · 403 · 422 · 429 · 503