الانتقال إلى الوثائق
فتح لوحة التحكم
في هذه الصفحة

POST /oauth/token

يستخدم OAuth بروتوكول S256 PKCE ورابط إعادة توجيه مطابقًا وموردًا منفصلًا لـ REST أو MCP. تتم الموافقة داخل Tong، وتتغير رموز التحديث مع كل استخدام.

مثال طلب#

curl -X POST 'https://platform.tongai.io/oauth/token' \  -H "Content-Type: application/x-www-form-urlencoded" \  --data-urlencode 'grant_type=refresh_token' \  --data-urlencode 'refresh_token=YOUR_REFRESH_TOKEN' \  --data-urlencode 'client_id=https://your-app.example/oauth-client.json' \  --data-urlencode 'resource=https://platform.tongai.io/mcp'
الإعدادات
curl --version

المصادقة#

none

المعاملات#

لا توجد معاملات مطلوبة.

محتوى الطلب#

application/x-www-form-urlencoded
object

مخطط الاستجابة#

JSON
{  "access_token": "YOUR_ACCESS_TOKEN",  "token_type": "Bearer",  "expires_in": 300,  "refresh_token": "YOUR_REFRESH_TOKEN",  "scope": "catalog:read operations:read"}

الأخطاء والحدود#

JSON
{  "error": "invalid_request"}