Features
- ✅ Socket Mode (no public URL required)
- ✅ Direct messages and channel mentions
- ✅ App-level and bot tokens
- ✅ Reaction support
- ✅ Configurable group policy
Setup
Create a Slack app
- Go to Slack API
- Click Create New App
- Select From scratch
- Choose an app name and select your workspace
Enable Socket Mode
- In app settings, go to Socket Mode
- Toggle Enable Socket Mode to ON
- Click Generate to create an App-Level Token
- Add the
connections:writescope - Copy the token (format:
xapp-...)
Configure OAuth & Permissions
- Go to OAuth & Permissions
- Under Bot Token Scopes, add:
chat:write— Send messagesreactions:write— Add reactionsapp_mentions:read— Read mentions
- Scroll up and click Install to Workspace
- Authorize the app
- Copy the Bot User OAuth Token (format:
xoxb-...)
Configure Event Subscriptions
- Go to Event Subscriptions
- Toggle Enable Events to ON
- Under Subscribe to bot events, add:
message.im— Direct messagesmessage.channels— Channel messagesapp_mention— @mentions
- Click Save Changes
Enable App Home
- Go to App Home
- Scroll to Show Tabs
- Enable Messages Tab
- Check “Allow users to send Slash commands and messages from the messages tab”
Get your User ID (optional)
To restrict access to specific users:
- Click your profile in Slack
- Select Profile → More → Copy member ID
Configuration Options
Enable the Slack channel
Bot User OAuth Token from Slack (format:
xoxb-...)Found in: OAuth & Permissions → Bot User OAuth TokenApp-Level Token from Slack (format:
xapp-...)Found in: Socket Mode → App-Level TokensList of Slack user IDs allowed to interact with the botExamples:
- Single user:
["U01234ABCDE"] - Multiple users:
["U01234ABCDE", "U56789FGHIJ"] - All users:
[](empty array)
Controls how the bot responds in channels:
"mention"(default) — Only respond when @mentioned"open"— Respond to all channel messages"allowlist"— Restrict to specific channels
DM policy defaults to open. Set
"dm": {"enabled": false} to disable DMsGroup Policy
Understanding groupPolicy options
Understanding groupPolicy options
Troubleshooting
Bot doesn't respond
Bot doesn't respond
Common issues:
- Socket Mode not enabled — Check Socket Mode is ON
- Missing scopes — Verify all required scopes are added
- User ID not in allowFrom — Check your Slack user ID
- Events not subscribed — Ensure bot events are configured
- App not installed — Click “Install to Workspace”
nanobot gateway -vBot not responding in channels
Bot not responding in channels
- Check
groupPolicysetting:- If set to
"mention", you must @mention the bot - Change to
"open"to respond to all messages
- If set to
- Verify bot is invited to the channel:
/invite @yourbot - Check bot has permission to read and write in channel
- Ensure
message.channelsevent is subscribed
Socket connection fails
Socket connection fails
If Socket Mode connection fails:
- Verify
appTokenis correct (starts withxapp-) - Ensure app token has
connections:writescope - Check
botTokenis correct (starts withxoxb-) - Verify tokens haven’t been revoked
- Restart gateway:
nanobot gateway
Invalid auth token errors
Invalid auth token errors
Error: “invalid_auth” or “token_revoked”Solution:
- Go to Slack API → Your App → OAuth & Permissions
- Click Reinstall to Workspace
- Copy the new Bot User OAuth Token
- Update
botTokenin config - Restart gateway
Missing scopes error
Missing scopes error
If you see “missing_scope” errors:
- Go to OAuth & Permissions → Scopes
- Add missing bot token scopes
- Reinstall the app to apply new permissions
- Restart gateway
Complete Example
Full configuration with all options:Related Pages
Configuration Overview
Learn about channel configuration
Security Settings
Set up access control