connections

POST /v1/connections/{provider}

Validate or store a provider access token.

Բոլոր connections վերջնակետերը

Նույնականացում

Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա connections.manage թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:

Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն

Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:

Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:

Փորձել

Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:

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

Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը 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.

Պատասխան

ԱնունՏեսակՊահանջվում էԻնչ է դա
validbooleanԱյո
account_loginobjectԱյոThe account the token authenticates as, when valid.
scopesstring[]Այո
missing_scopesstring[]Այո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…
messageobjectԱյոHuman-readable explanation, or null when valid.
permissionsPermissionReport | 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