Auth0 Home Blog Docs

How to retrieve another user's user_id based on email address?

api
management-api
user_id
user-profile

#1

Is there an API to get user_detail information based on the email address instead of the user_id?

Basically, I’m setting up a chat system and I want the user to be able to enter their friend’s email address instead of a very long user_id value. Is there anyway to retrieve the user_id based on the email address?


#2

The Management API User Search endpoint supports this.

You could perform a search with email:"james@bond.com" as the q parameter.


#3

OK. I’ll test that out. Thank you!!! =)


#4

Do you have an example of how to do this via Objective-C in an iOS application?

I’m having some trouble with it. It keeps returning 404 not found. But, when I test it from the management API in a web browser with the same API token, that works.

Does this have to be put in the body tag? In my iOS code, I just have it appended to the end of the URL. But, that doesn’t seem to work at all.


#5

Never mind. I got it. =) I had an extra / in my URL that wasn’t needed.


#6