connections
POST /v1/connections/{provider}
Validate or store a provider access token.
ავტორიზაცია
API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს connections.manage ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.
სwhere your organisation id goes-ის ადგილი
ეს ენდპოინტი იყენებს პარამეტრად org_id. მისი გამოტოვების შემთხვევაში ზარი ფარავს თქვენი იჯარის მთელ ქვეხეს, ხოლო გაგზავნისას ზარი შეიზღუდება მხოლოდ ერთ ორგანიზაციამდე.
თქვენი ორგანიზაციის ID მითითებულია თქვენი სამართავი პანელის API გასაღებების ეკრანზე, თავად გასაღებთან ახლოს. ის ერთნაირია თქვენ მიერ განხორციელებულ ყველა გამოძახებაში.
სცადეთ
შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"შესული ხართ? თქვენი სამართავ პანელში არსებული API კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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