List Channels
Retrieve all configured channel adapters and their status.Configure Channel
Add or update a channel configuration.Channel adapter name (e.g.,
telegram, discord, slack)Environment variable name containing the bot token
Default agent name to handle messages
Whitelist of user IDs (platform-specific)
Whitelist of channel/room IDs (for Slack, Discord)
Whitelist of guild/server IDs (for Discord)
Configuration fields vary by channel adapter. See channel-specific documentation for full schemas.
Remove Channel
Remove a channel configuration.Channel adapter name
Test Channel
Send a test message through a channel to verify configuration.Channel adapter name
Recipient ID (user ID, channel ID, etc.)
Test message text
Reload Channels
Reload all channel configurations fromconfig.toml without restarting the daemon.
WhatsApp QR Login
WhatsApp supports two modes: QR code scan (personal WhatsApp) and Business API (requires Meta developer account).Start QR Login
Initiate WhatsApp QR code login flow.QR session ID
Base64-encoded QR code PNG image
QR code expiration time in seconds
Check QR Status
Poll for QR code scan completion.QR session ID
Status:
pending, scanned, authenticated, expired, failedAuthenticated phone number (when
authenticated)Supported Channels
OpenFang supports 40+ channel adapters across 5 categories:Messaging (12)
- Telegram — Bot API with long-polling
- Discord — Gateway bot adapter
- Slack — Socket Mode + Events API
- WhatsApp — Personal (QR) + Business API
- Signal — signal-cli REST API
- Matrix — Matrix/Element bot
- LINE — LINE Messaging API
- Viber — Viber Bot API
- Messenger — Facebook Messenger
- WeChat — WeChat Official Account
- Kik — Kik Bot API
- Threema — Threema Gateway
Team Collaboration (8)
- Microsoft Teams — Bot Framework
- Mattermost — Webhooks + API
- Rocket.Chat — Real-time API
- Zulip — Bot API
- Google Chat — Chat API
- Webex Teams — Webex Bot
- Flock — Flock Bot API
- Chanty — Chanty API
Email (3)
- SMTP — Outbound email
- IMAP — Inbound email polling
- Gmail API — Gmail integration
Social (10)
- Twitter/X — Twitter API v2
- Reddit — Reddit API
- Mastodon — Mastodon API
- Bluesky — AT Protocol
- LinkedIn — LinkedIn API
- Instagram — Instagram Graph API
- Snapchat — Snap Kit
- TikTok — TikTok API
- Pinterest — Pinterest API
- Tumblr — Tumblr API
Voice/Video (4)
- Twilio — SMS + Voice
- Twitch — Twitch Chat IRC
- YouTube Live — Live Chat API
- Zoom — Zoom Chat Bot
Other (3)
- IRC — Traditional IRC
- XMPP/Jabber — XMPP protocol
- SMS — Generic SMS gateway
Channel Configuration
Channels are configured in~/.openfang/config.toml:
Message Routing
When a message arrives from a channel:- Extract sender identity — Platform-specific user ID
- Check agent bindings — Look for user-to-agent mapping
- Fall back to default — Use
default_agentfrom config - Send to agent — Forward message to resolved agent
- Stream response — Send agent’s reply back to channel
Agent Bindings
Map specific users to specific agents:123456 will always talk to the coder agent.
Best Practices
Use environment variables for tokens
Use environment variables for tokens
Never hardcode bot tokens in Then set the env var:
config.toml. Use env vars:Whitelist users for security
Whitelist users for security
Restrict channel access to known users:Messages from other users will be rejected.
Set up dedicated agents per channel
Set up dedicated agents per channel
Create specialized agents for each platform:This allows platform-specific behavior and context.
Test channels after configuration
Test channels after configuration
Always test after configuring:Verify you receive the test message on the platform.
Monitor channel bridge logs
Monitor channel bridge logs
Check logs for channel errors:Or use the live log streaming endpoint:
Next Steps
Agents API
Configure agents for channels
Agent Bindings
Map users to agents
Channel Setup
Platform-specific guides
Security
Secure channel configurations
