طلب API لإرجاع مستخدم بناءً على معرّفه الخارجي

هل يعرف أحد كيف يمكنني الحصول على “external_id” لمستخدم من واجهة برمجة التطبيقات (API)؟ لقد أضفت external_id عند تسجيل الدخول عبر SSO، لكن الآن عند استعلام المستخدمين، لا أرى أي “external_id” في كائن المستخدم الذي تعيده واجهة برمجة التطبيقات. أحاول استخدام external_id كطريقة لتحديد المستخدمين من قاعدة بياناتي عند معالجة ويب هوك.

Yes, this can be done by sending an authenticated GET request to https://discourse.example.com/u/by-external/{external_id}.json

This route is documented here: Discourse API Docs.

إعجابَين (2)

And to get the inverse (ie obtain the external_id given a user_id) you can either:

Note that single_sign_on_record (and external_id) is NOT returned by a call to:
https://discourse.example.com/users/{username}.json

إعجابَين (2)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.