๐ผ Slack Quickstart
Create a Slack app and add it to your workspace in 10 minutes.
โก Quick Setup (10 minutes)
Step 1: Create Slack App
- Go to Slack API Apps
- Click "Create New App"
- Choose "From scratch"
- Name it (e.g., "InfiniBot Assistant")
- Select your workspace
- Click Create App
Step 2: Configure Bot Permissions
- Click "OAuth & Permissions" in sidebar
- Scroll to "Scopes" โ "Bot Token Scopes"
- Add these scopes:
| Scope | Why |
|---|---|
chat:write |
Send messages |
channels:history |
Read channel messages |
channels:read |
List channels |
groups:history |
Read private channel messages |
groups:read |
List private channels |
im:history |
Read DMs |
im:read |
Access DM info |
im:write |
Send DMs |
users:read |
Get user info |
app_mentions:read |
See @mentions |
Step 3: Install to Workspace
- Scroll up to "OAuth Tokens"
- Click "Install to Workspace"
- Click Allow
- Copy the "Bot User OAuth Token" (starts with
xoxb-)
Step 4: Enable Socket Mode
- Click "Socket Mode" in sidebar
- Toggle Enable Socket Mode ON
- Create an app-level token:
- Name: "infinibot"
- Scope:
connections:write
- Copy the App-Level Token (starts with
xapp-)
Step 5: Subscribe to Events
- Click "Event Subscriptions" in sidebar
- Toggle Enable Events ON
- Under "Subscribe to bot events", add:
message.channelsmessage.groupsmessage.imapp_mention
Step 6: Add Tokens to InfiniBot
Edit ~/.infinibot/infinibot.json:
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-your-bot-token",
"appToken": "xapp-your-app-token"
}
}
}
Step 7: Restart Gateway
infinibot gateway restart
Step 8: Invite Bot to Channel
In Slack:
- Go to a channel
- Type
/invite @YourBotName
Or: Click channel name โ Integrations โ Add apps
Step 9: Message Your Bot! โ
@mention the bot or DM it directly.
๐ Required Scopes Summary
chat:write
channels:history
channels:read
groups:history
groups:read
im:history
im:read
im:write
users:read
app_mentions:read
๐ง Configuration Options
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-...",
"appToken": "xapp-...",
"channels": {
"general": { "requireMention": true },
"bot-help": { "requireMention": false }
}
}
}
}
๐ Security: DM Access
Allowlist specific users:
{
"channels": {
"slack": {
"dm": {
"policy": "allowlist",
"allowFrom": ["U01234567"]
}
}
}
}
Find User ID: Click on a user โ View profile โ More (โฎ) โ Copy member ID
โ Verify Connection
# Check status
infinibot status
# Send a test message
infinibot message send --channel slack --target "#general" --message "Hello from InfiniBot!"
๐ ๏ธ Troubleshooting
Bot not responding in channel
- Is the bot invited to the channel?
/invite @BotName - Check Socket Mode is enabled
- Check event subscriptions are configured
"not_in_channel" error
Invite the bot: /invite @BotName
"missing_scope" error
Add the missing scope in OAuth & Permissions, then reinstall the app.
"invalid_auth" error
Tokens are invalid. Regenerate them:
- OAuth & Permissions โ Reinstall app โ Copy new bot token
- Basic Information โ App-Level Tokens โ Regenerate
Socket Mode disconnects
Check your appToken (xapp-) is correct and has connections:write scope.
๐ Full Documentation
For slash commands, interactive messages, and enterprise setup: