plugins/omi-slack-app/TOKEN_DEBUG.md
Messages are posting as BOT instead of USER on Railway (but worked locally).
as_user Parameteras_user=True parameter is deprecated and can cause issuesSlack has two types of tokens:
If the app has Bot Token Scopes configured in Slack, it may default to bot tokens even when user scopes are requested.
After re-deploying, check the Railway logs when authenticating:
✅ Using USER token (messages will appear as user)
✅ User token starts with: xoxp-...
🔑 Sending with USER token: xoxp-...
✅ Message posted as USER
⚠️ WARNING: Using BOT token (user token not available)
⚠️ This means messages will post as BOT, not as USER
🔑 Sending with BOT token: xoxb-...
⚠️ Message posted as BOT (bot_id: ...)
Users who authenticated before the fix need to re-authenticate:
If still posting as bot, verify your Slack App configuration at https://api.slack.com/apps:
OAuth & Permissions page:
User Token Scopes should have:
channels:readchat:writegroups:readusers:readBot Token Scopes should be EMPTY or minimal
chat:write, Slack may prioritize bot tokenApp Manifest (Settings > App Manifest):
oauth_config:
scopes:
user:
- channels:read
- chat:write
- groups:read
- users:read
# bot: [] # Leave empty or remove
Ensure Railway has the same Slack app credentials as local:
SLACK_CLIENT_IDSLACK_CLIENT_SECRETxoxp-* = User token (posts as user) ✅xoxb-* = Bot token (posts as bot) ❌xoxa-* = App-level tokenxoxr-* = Refresh tokenUse the test interface with ?dev=true:
https://your-railway-app.railway.app/test?dev=true
Check logs for token type when sending messages.