connections

POST /v1/connections/{provider}

Validate or store a provider access token.

جميع نقاط نهاية connections

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (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.

الاستجابة

الاسمالنوعمطلوبما هو هذا
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