connections
POST /v1/connections/{provider}
Validate or store a provider access token.
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د connections.manage اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
چیرته چې ستاسو د سازمان آی ډي ځي
دا پای ټکی د پوښتنې پیرامیتر په توګه org_id اخلي. دا پریږدئ او زنګ ستاسو د استوګنې ټولې څانګې پوښي؛ د یوې سازمان لپاره د زنګ محدودولو لپاره یې واستوئ.
ستاسو د سازمان آی ډي ستاسو په ډشبورډ کې د API کېلي پر سکرین، خپله د کېلي څنګ ته شتون لري. دا په هره هغه غوښتنه کې چې تاسو یې کوئ، ورته آی ډي وي.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"ننوتي یاست؟ ستاسو په ډشبورډ کې د API کنسول ستاسو د اصلي سازمان ID او ستاسو خپله کیلي ډکوي، او غوښتنه د ژوندی API په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د API په کنسول کې پرانیزئ
تفصیلات
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`.
پارامترونه
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
provider (path) | ConnectionProvider | هو | The third-party provider whose connections are addressed. |
org_id (query) | Uuid | نه | 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 | نه | Client-generated key that makes an unsafe request replay-safe: the server stores the first response and returns it verbatim for repeats. |
ځواب
| نوم | ډول | اړین | دا څه شی دی |
|---|---|---|---|
valid | boolean | هو | — |
account_login | object | هو | The account the token authenticates as, when valid. |
scopes | string[] | هو | — |
missing_scopes | string[] | هو | 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 | هو | Human-readable explanation, or null when valid. |
permissions | PermissionReport | null | نه | 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… |
تېروتنې چې دا پای ټکی یې بیرته راګرځولی شي
401 · 403 · 422 · 429 · 503