Slack API · error code

Slack error as_user_not_supported: as_user is not supported here

Permanent - do not retryHTTP 200Scopes, permissions & admin policy

Last verified against Slack API reference - chat.postMessage errors

What Slack returns
The as_user parameter does not function with workspace apps.

What error as_user_not_supported means

The request passed the legacy as_user parameter in a context that does not support it. The chat.postMessage reference documents the error as "The as_user parameter does not function with workspace apps." as_user dates from classic-app days, when it controlled whether a message was posted as the authed user rather than as the app; modern granular-permission apps largely make the parameter meaningless, and in unsupported combinations Slack rejects the call outright instead of ignoring the flag.

You usually inherit this error rather than write it: an old code sample, a long-lived internal library, or a copy-pasted snippet still sets as_user: true, and it keeps working until the app is migrated or reinstalled under a permission model where the parameter is unsupported. The message content is fine; the single legacy flag is the problem.

The correct modern approach: post with your bot token to appear as the bot (optionally customizing username and icon_url/icon_emoji with chat:write.customize), or post with a user token to appear as that user. Identity now follows the token, not a boolean.

What it looks like

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

Why it happens

  • Legacy code or samples still pass as_user on chat.postMessage or chat.postEphemeral.
  • An app migrated to granular permissions (or a workspace-app model) where the parameter is unsupported.
  • A wrapper library sets as_user by default under the hood.

How to fix Slack error as_user_not_supported

  1. 1Remove the as_user parameter from the request.
  2. 2To post as the app, simply use the bot token; to customize the display, add chat:write.customize and set username/icon fields.
  3. 3To genuinely post as a user, obtain a user token with chat:write for that user and send with it.
  4. 4Search the codebase and dependencies for as_user defaults so the flag does not creep back in.

How to stop it recurring

Treat as_user as retired in new code: identity is chosen by which token you send. When upgrading old integrations, grep for as_user during the migration and delete it deliberately rather than waiting for this error in production.

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

Related codes

Error as_user_not_supported - quick answers

What does Slack error as_user_not_supported mean?

The request passed the legacy as_user parameter in a context that does not support it.

How do I fix Slack error as_user_not_supported?

1. Remove the as_user parameter from the request. 2. To post as the app, simply use the bot token; to customize the display, add chat:write.customize and set username/icon fields. 3. To genuinely post as a user, obtain a user token with chat:write for that user and send with it. 4. Search the codebase and dependencies for as_user defaults so the flag does not creep back in.

Should I retry after error as_user_not_supported?

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.