Channel Setup
OpenFang supports 40 messaging platforms through channel adapters. Each adapter enables agents to receive messages and respond across different communication channels.Quick Setup
Run setup wizard
- Creating bot tokens
- Configuring credentials
- Setting permissions
- Testing the connection
Platform-Specific Guides
Telegram
Create a bot
- Message @BotFather on Telegram
- Send
/newbot - Follow prompts to choose name and username
- Copy the bot token (format:
123456:ABC-DEF...)
Discord
Create a Discord bot
- Go to Discord Developer Portal
- Click “New Application”
- Navigate to “Bot” tab
- Click “Add Bot”
- Copy the bot token
- Enable “Message Content Intent” under Privileged Gateway Intents
Invite bot to server
- Go to “OAuth2” → “URL Generator”
- Select scopes:
bot,applications.commands - Select permissions:
Send Messages,Read Message History - Copy and visit the generated URL
Slack
Create a Slack app
- Go to api.slack.com/apps
- Click “Create New App” → “From scratch”
- Choose app name and workspace
Configure permissions
Under “OAuth & Permissions”, add Bot Token Scopes:
chat:writechannels:historygroups:historyim:historympim:history
Install to workspace
Click “Install to Workspace” and authorize.
Copy the “Bot User OAuth Token” (starts with
xoxb-).Email (IMAP/SMTP)
Get credentials
For Gmail:
- Enable 2FA on your Google account
- Generate an App Password at myaccount.google.com/apppasswords
- Use this password (not your regular Gmail password)
Channel Configuration
Per-Channel Overrides
Customize agent behavior per channel:Output Formatting
Choose how agent responses are formatted:Testing Channels
After setup, test each channel:Troubleshooting
Bot doesn't respond
Bot doesn't respond
- Check channel is enabled:
openfang channel list - Verify token is correct:
openfang config show - Check logs:
tail ~/.openfang/logs/channels/*.log - Ensure agent is running:
openfang agent list
Rate limit errors
Rate limit errors
Reduce
rate_limit in channel config:Permission errors (Discord/Slack)
Permission errors (Discord/Slack)
Verify bot has required scopes/permissions in the platform’s developer portal.
WhatsApp connection fails
WhatsApp connection fails
Ensure the WhatsApp gateway is running and accessible:
Channel Security
DM/Group Policies
Control where agents respond:allow_all- Respond to everyonewhitelist- Only respond to allowed usersopt-in- Require explicit mention/activationdisabled- Don’t respond at all
Rate Limiting
Per-user rate limits prevent abuse:Next Steps
Channel Configuration
Complete channel configuration reference
Agent Setup
Configure agents to work with channels
