Hello,
I’d like to create and retrieve a user via the API using an external_id. The external_id would be an integer that references an ID in our internal database. This is not SSO related.
I’m following the documentation but I can’t seem to get it to work. I can create the user but I cannot retrieve the user by external_id. The Create User API just shows the request to have an external_ids object but no more information on what the contents of the object should be. I searched the Community and only found this topic, but it wasn’t much help.
I’m trying to retrieve the user using the following GET request:
https://our_domain.discourse.group/u/by-external/7000.json
but it returns a 404 and the following response:
{ "errors": [ "The requested URL or resource could not be found." ], "error_type": "not_found" } Following are examples of some of the Create User requests I’ve tried. The users are created successfully, I just can’t retrieve them by external_id. (Side note: is there also a way to view the external_id of a user?):
{ "name": "John", "username": "Doe", "email": "john.doe@example.com", "password": "Z44Di3AeD93KoRUyxpyE", "active": true, "approved": true, "external_id": 7000 } { "name": "John", "username": "Doe", "email": "john.doe@example.com", "password": "Z44Di3AeD93KoRUyxpyE", "active": true, "approved": true, "external_id": "7000" } { "name": "John", "username": "Doe", "email": "john.doe@example.com", "password": "Z44Di3AeD93KoRUyxpyE", "active": true, "approved": true, "external_ids": { "external_id": 7000 } } { "name": "John", "username": "Doe", "email": "john.doe@example.com", "password": "Z44Di3AeD93KoRUyxpyE", "active": true, "approved": true, "external_ids": [ 7000 ] }