users.lookupByEmail
method
We're still building and not all features are available quite yet. Enjoy this peek into the future!
Not ready for the future? Return to the past at api.slack.com.
Usage info
Retrieve a single user by looking them up by their registered email address. Requires [users:read.email
](/reference/scopes/users.read.email.
Custom bot users cannot use this method.
Response
Returns a user object.
If the user has been deactivated, users_not_found
will be returned instead of a user object. Instead, you can call users.list and filter the results to find the deactivated user.
Profile
The profile hash contains as much information as the user has supplied in the default profile fields: first_name
, last_name
, real_name
, display_name
, skype
, and the image_*
fields. Only the image_*
fields are guaranteed to be included. Data that has not been supplied may not be present at all, may be null or may contain the empty string ("").
A user's custom profile fields may be discovered using users.profile.get
.
Email addresses
The [users:read.email
](/reference/scopes/users.read.email OAuth scope is now required to access the email
field in user objects returned by the users.list
and users.info
web API methods. users:read
is no longer a sufficient scope for this data field. Learn more.
Apps created after January 4th, 2017 must explicitly request the users:read.email
OAuth permission scope when using the OAuth app installation flow to enable access to this method.