Slack: socket mode connection/auth fails (xapp/xoxb tokens)
Fix Slack socket mode issues by validating xapp/xoxb tokens, enabling socket mode, and reinstalling the app with correct scopes/events.
Symptoms
- Slack stays disconnected, or Slack events never arrive.
- Logs mention auth problems such as
invalid_auth/not_authed. - You’re using Socket Mode but messages never trigger the bot.
Cause
Slack Socket Mode requires two tokens:
- App token:
xapp-...(must includeconnections:write) - Bot token:
xoxb-...
Connection/auth fails when:
- One token is missing/wrong, or swapped (xapp vs xoxb).
- Socket Mode is not enabled in the Slack app.
- The app was not reinstalled after changing scopes/events.
If you need the broader channel rollout model - workspace policy, thread posture, and mention gating - keep /channels/slack open beside this token fix.
Fix
1) Validate you have both tokens configured
In channels.slack config (or env vars), ensure both are set:
SLACK_APP_TOKEN=xapp-...SLACK_BOT_TOKEN=xoxb-...
Restart the gateway after changes.
2) Recreate/reinstall tokens in Slack
In Slack Developer Portal:
- Enable Socket Mode.
- Create an App-Level Token with scope
connections:write(xapp). - Install the app to your workspace to generate the Bot token (xoxb).
If you changed scopes/events, reinstall the app.
3) Invite the bot to the target channel(s)
Even with correct tokens, Slack won’t deliver channel messages unless the bot is in the channel.
Verify
openclaw channels status --probeshows Slack connected.- Mentioning the bot or sending a DM triggers a response.
If auth is healthy but channels still stay quiet, continue with /troubleshooting/solutions/slack-bot-not-responding-in-channels.