✈️Telegram
Polling-based bot using the teloxide library. Feature flag: channel-telegram.
1. Create a bot
- Message @BotFather on Telegram
- Use the
/newbotcommand and follow the instructions - Copy the bot token
2. Get your user ID
- Message @userinfobot to get your Telegram user ID
- Or use @getidsbot
3. Configure
{
"channels": {
"telegram": {
"enabled": true,
"token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz",
"allowFrom": ["123456789"],
"proxy": null
}
}
}
"socks5://127.0.0.1:1080").Supported features
🎮Discord
WebSocket gateway using the serenity library. Feature flag: channel-discord.
1. Create a bot
- Go to discord.com/developers/applications
- Click "New Application"
- Go to the "Bot" section
- Click "Add Bot"
- Under "Token", click "Reset Token" and copy it
- Enable "Message Content Intent" under "Privileged Gateway Intents"
2. Invite bot to your server
- Go to "OAuth2" > "URL Generator"
- Select scopes:
bot,applications.commands - Select bot permissions:
Send Messages,Read Message History - Copy the generated URL, open it in browser, select your server and authorize
3. Get user IDs
- Enable Developer Mode in Discord (Settings > Advanced > Developer Mode)
- Right-click on users or channels and select "Copy ID"
4. Configure
{
"channels": {
"discord": {
"enabled": true,
"token": "your-discord-bot-token",
"allowFrom": ["123456789012345678"]
}
}
}
Supported features
💼Slack
Socket Mode (WebSocket) via tokio-tungstenite. No public endpoint required. Feature flag: channel-slack.
1. Create a Slack app
- Go to api.slack.com/apps
- Click "Create New App" > "From scratch"
- Name your app and select your workspace
2. Enable Socket Mode
- Go to "Socket Mode" in the left sidebar
- Toggle "Enable Socket Mode" to ON
- Click "Generate Token" under "App-Level Tokens"
- Name it (e.g., "Socket Mode Token") and generate
- Copy the token (starts with
xapp-)
3. Add bot token scopes
Go to "OAuth & Permissions" > "Bot Token Scopes" and add:
| Scope | Purpose |
|---|---|
| chat:write | Send and edit messages |
| channels:history | Read messages in public channels |
| groups:history | Read messages in private channels |
| im:history | Read direct messages |
| mpim:history | Read group direct messages |
| users:read | Look up usernames from user IDs |
| files:read | Download image attachments from messages |
| files:write | Upload outbound media to channels |
| reactions:write | Add emoji reactions to acknowledge messages |
Optional but recommended:
| Scope | Purpose |
|---|---|
| users:write | Set bot presence to "active" on startup |
Scroll up and click "Install to Workspace". Copy the "Bot User OAuth Token" (starts with xoxb-).
4. Enable App Home messaging
- Go to "App Home" in the left sidebar
- Under "Show Tabs", enable the Messages Tab
- Check "Allow users to send Slash commands and messages from the messages tab"
5. Subscribe to events
- Go to "Event Subscriptions"
- Enable "Enable Events"
- Subscribe to bot events:
app_mention,message.channels,message.groups,message.im
6. Get user IDs
Click on a user's profile in Slack, click the three dots menu, select "Copy member ID".
7. Configure
{
"channels": {
"slack": {
"enabled": true,
"botToken": "xoxb-1234567890-1234567890123-abcdefghijklmnopqrstuvwx",
"appToken": "xapp-1-A1234567890-1234567890123-abcdefghijklmnopqrstuvwxyz1234567890",
"allowFrom": ["U01234567"]
}
}
}
appToken must be a Socket Mode token (starts with xapp-), not a bot token. Socket Mode allows your app to receive events without exposing a public HTTP endpoint.Supported features
Linked-device mode using whatsapp-rust. Runs as a secondary device on your phone. Feature flag: channel-whatsapp.
1. First-time setup
- Run
./oxicrab gatewaywith WhatsApp enabled in config - Scan the QR code displayed in the terminal with your phone (WhatsApp > Settings > Linked Devices > Link a Device)
- Session is automatically stored in
~/.oxicrab/whatsapp/whatsapp.db
2. Configure
{
"channels": {
"whatsapp": {
"enabled": true,
"allowFrom": ["15037348571"]
}
}
}
Phone number format
Use phone numbers in international format (country code + number). No spaces, dashes, or plus signs.
Example: "15037348571" for US number +1 (503) 734-8571
Supported features
📞Twilio (SMS/MMS)
Webhook-based using axum. Supports both SMS API and Conversations API. Feature flag: channel-twilio.
1. Get credentials
- Sign up at console.twilio.com
- Copy your Account SID and Auth Token from the dashboard
2. Buy a phone number
- Go to Phone Numbers > Buy a Number
- Ensure SMS capability is checked
- Note the number in E.164 format (e.g.
+15551234567)
3. Create a Conversation Service
- Go to Messaging > Conversations > Manage > Create Service
- Note the Conversation Service SID
4. Configure webhooks
- Go to Conversations > Manage > [Your Service] > Webhooks
- Set Post-Webhook URL to your server's public URL (e.g.
https://your-server.example.com/twilio/webhook) - Subscribe to events:
onMessageAdded - Method: POST
5. Add participants to conversations
Conversations need participants before messages flow:
curl -X POST "https://conversations.twilio.com/v1/Conversations/{ConversationSid}/Participants" \
-u "YOUR_ACCOUNT_SID:YOUR_AUTH_TOKEN" \
--data-urlencode "MessagingBinding.Address=+19876543210" \
--data-urlencode "MessagingBinding.ProxyAddress=+15551234567"
6. Expose your webhook
The webhook server must be reachable from the internet. Options:
- Cloudflare Tunnel (recommended):
cloudflared tunnel run— free, stable, no open ports - ngrok:
ngrok http 8080— quick for development - Reverse proxy: nginx/caddy with TLS termination
7. Configure
{
"channels": {
"twilio": {
"enabled": true,
"accountSid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"authToken": "your-auth-token",
"phoneNumber": "+15551234567",
"webhookPort": 8080,
"webhookPath": "/twilio/webhook",
"webhookUrl": "https://your-server.example.com/twilio/webhook",
"allowFrom": []
}
}
}
Supported features
Common patterns
Selective compilation
Each channel is a Cargo feature flag. Build only what you deploy:
# All channels (default)
cargo build --release
# Only Telegram and Slack
cargo build --release --no-default-features --features channel-telegram,channel-slack
# No channels (agent CLI only)
cargo build --release --no-default-features
Allowlist filtering
All channels support an optional allowFrom array. When empty, all senders are accepted. When populated, only listed IDs can interact with the bot.
Media handling
Inbound media (images, voice messages) is downloaded and saved to ~/.oxicrab/media/ with channel-specific prefixes. Voice messages are automatically transcribed if the transcription service is configured.
Auto-reconnection
All channels implement exponential backoff retry loops (5–60 seconds). Reconnection is automatic after network disconnects or backend errors.