Get the user_id with the provider on API signup

Hello,

When I create a new user with /dbconnections/signup, the response contains only the short user_id :

{"_id":"5aab90daaa9ad130c17483f8","email_verified":false,"email":"myemail@gmail.com"}

How can I retrieved the user_id prefixed with the provider : auth0|5aab90daaa9ad130c17483f8?

Hey @abasille :wave: The user_id you specified is actually the correct one.

Since the POST /dbconnections/signup endpoint only works on database connections, the user_id will always be of the format: auth0|{_id} where {_id} is simply the value returned by the call the /dbconnections/signup. In your example: _id = 5aab90daaa9ad130c17483f8.

You can simply append auth0| to the _id returned and you should be good to go :slight_smile:

Thank you @fady for your clear and fast answer!

1 Like

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