Slack API · error code

Slack error users_not_found: No user found for that email address

Permanent - do not retryHTTP 200Channels, membership & DMs

Last verified against Slack API reference - chat.postMessage errors

What Slack returns
Value passed for user was invalid.

What error users_not_found means

users.lookupByEmail could not match the email you passed to an active user in this workspace. The error table describes it as "Value passed for user was invalid," and the method's notes add a key detail: "If the user has been deactivated, users_not_found will be returned instead of a user object." Note the plural: it is users_not_found, not the user_not_found that other methods return.

So there are three common readings. The email simply is not registered in this workspace (a personal address versus a work address, or a different workspace than the token's). The person exists but is deactivated. Or the string is not what you think it is, for example with trailing whitespace or a display name instead of an email.

The method needs the users:read.email scope, and the docs note that "Custom bot users cannot use this method." If the scope is missing you will see missing_scope, not this error.

What it looks like

GET /api/users.lookupByEmail?email=jane%40example.com

{"ok": false, "error": "users_not_found"}

Why it happens

  • The email address is not registered to any user in the token's workspace.
  • The matching user has been deactivated.
  • The value has stray whitespace or is not an email address at all.
  • The token belongs to a different workspace than the person.

How to fix Slack error users_not_found

  1. 1Trim and normalize the email before calling, and log the exact value sent.
  2. 2Confirm the workspace with auth.test and check that the person is a member there.
  3. 3To find deactivated users, call users.list and filter on the profile email and deleted flag, as the docs suggest.
  4. 4Ask the person for the email on their Slack profile if it differs from your records.

How to stop it recurring

Resolve emails to Slack user IDs once, at onboarding, and store the ID. Re-resolve only when a send fails. Treat users_not_found as "not reachable in this workspace" and route the person to another channel instead of retrying. Show the unmatched email to whoever configured the mapping so they can correct it.

Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.

Related codes

Error users_not_found - quick answers

What does Slack error users_not_found mean?

users.lookupByEmail could not match the email you passed to an active user in this workspace. The error table describes it as "Value passed for user was invalid," and the method's notes add a key detail: "If the user has been deactivated, users_not_found will be returned instead of a user object." Note the plural: it is users_not_found , not the user_not_found that other methods return.

How do I fix Slack error users_not_found?

1. Trim and normalize the email before calling, and log the exact value sent. 2. Confirm the workspace with auth.test and check that the person is a member there. 3. To find deactivated users, call users.list and filter on the profile email and deleted flag, as the docs suggest. 4. Ask the person for the email on their Slack profile if it differs from your records.

Should I retry after error users_not_found?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging Slack by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.