connections
POST /v1/connections/{provider}
Validate or store a provider access token.
Аутентификация
API кілтін bearer токені ретінде жіберіңіз. Кілтте connections.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.
Ұйымыңыздың идентификаторы орналасатын жер
Бұл соңғы нүкте сұрау параметрі ретінде org_id мәнін қабылдайды. Оны бос қалдырсаңыз, шақыру бүкіл жалға алушы тармағын қамтиды; шақыруды бір ұйымға шектеу үшін оны жіберіңіз.
Сіздің ұйым идентификаторыңыз басқару панеліндегі API кілттері экранында, кілттің өзінің жанында орналасқан. Бұл сіз жасайтын әрбір шақырудағы бірдей идентификатор.
Әрекет етіп көру
Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған 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`.
Параметрлер
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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. |
Жауап
| Аты | Tүрі | Міндетті | Мазмұны |
|---|---|---|---|
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