Does anyone know how can I obtain the “external_id” for a user from the api? I added an external_id at the sso login, but now when I query users, I do not see any “external_id” in the user hash returned by the API. I’m trying to use the external_id as a way to identify users from my database when processing a webhook.
Yes, this can be done by sending an authenticated
GET request to
This route is documented here: Discourse API Docs.
And to get the inverse (ie obtain the external_id given a user_id) you can either:
Use the Discourse Ruby API and call the method: user_sso(user_id)
Send an authenticated get request to:
and look for hash key [“single_sign_on_record”][“external_id”]
Note that single_sign_on_record (and external_id) is NOT returned by a call to:
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.