connections
POST /v1/connections/{provider}
Validate or store a provider access token.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن connections.manage؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.
حيث يتم إدخال معرف مؤسستك
تأخذ نقطة النهاية هذه org_id كمعلمة استعلام. اتركه فارغاً ليغطي الاستدعاء شجرة مستأجريك بالكامل، أو أرسله لتضييق نطاق الاستدعاء ليشمل منظمة واحدة.
معرف مؤسستك موجود على شاشة مفاتيح واجهة برمجة التطبيقات (API) في لوحة تحكمك، بجوار المفتاح نفسه. وهو نفس المعرف في كل طلب تجريه.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/connections/{provider} \
-H "Authorization: Bearer zdk_live_…"هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم 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