Sample - Slack Web API
GET/users.lookupByEmail

Find a user by email address

Retrieves the Slack user associated with an email address. Supply email to identify the user and use a token with the users:read.email scope.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
tokenstringrequired
Authentication token with the `users:read.email` scope.
emailstringrequired
Email address belonging to the user you want to retrieve.

2 status codes
200Returns an object containing `ok` set to true and the matching user object in `user`.
okbooleanrequired
Allowed:true
userarrayrequired
defaultTypical error response
callstackstringoptional
Note: PHP callstack is only visible in dev/qa
errorstringrequired
Allowed:users_not_foundenterprise_is_restrictednot_authedinvalid_authaccount_inactiveno_permissioninvalid_arg_nameinvalid_array_arginvalid_charsetinvalid_form_datainvalid_post_typemissing_post_type
okbooleanrequired
Allowed:false

Error handling

token must carry the users:read.email scope, and email must be an email address belonging to a user in the workspace. Both query values must be supplied.