Connect AI Agents to Slack, Discord & Telegram in Minutes
April 21, 2026 · Tutorial · 7 min read
You've built an AI agent. It's smart, it uses tools, it has access to your knowledge base. Now you want your team — or your customers — to talk to it without opening a browser.
The usual path is painful: install a bot SDK, handle webhook verification, parse platform-specific message formats, manage conversation state, figure out rate limits, and somehow keep the whole thing running.
Universal API's Channels feature skips all of that. You create a channel binding that connects a messaging platform directly to your agent. The platform handles message routing, signature verification, conversation threading, and group policies. You just configure credentials and pick an agent.
In this guide, you'll connect an existing agent to Slack, Discord, and Telegram. Each one takes about 2 minutes.
How Channels Work
The architecture is straightforward:
User sends message → Platform webhook → Universal API → Your Agent → Response → PlatformWhen you create a channel, Universal API generates a webhook URL. You configure that URL in your messaging platform. When someone sends a message, the platform hits the webhook, Universal API verifies the signature, routes the message to your agent, and sends the response back.
What you get for free:
- Platform signature verification — Slack signing secrets, Discord public keys, Telegram bot tokens
- Conversation threading — Messages in the same thread/DM maintain conversation context
- Sender allowlists — Restrict who can talk to the bot
- Group policies — Control whether the bot responds in channels, only when @mentioned, or only in DMs
- Auto-pause — After 3 consecutive failures, the channel pauses itself (no runaway error loops)
Prerequisites
- A Universal API account with an access token
- An existing agent (text or voice) — create one first if you haven't
- Admin access to your Slack workspace, Discord server, or Telegram bot
Slack
Step 1: Create a Slack App
- Go to api.slack.com/apps and click Create New App → From scratch
- Name it (e.g., "AI Assistant") and select your workspace
- Under OAuth & Permissions, add these Bot Token Scopes:
chat:write— Send messagesapp_mentions:read— Respond when @mentionedchannels:history— Read messages in public channelsim:history— Read DMs
- Install the app to your workspace and copy the Bot User OAuth Token (
xoxb-...) - Go to Basic Information and copy the Signing Secret
Step 2: Create the Channel
curl -X POST https://api.universalapi.co/channels \
-H "Authorization: Bearer YOUR_UAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "slack-assistant",
"platform": "slack",
"agentId": "YOUR_AGENT_ID",
"platformConfig": {
"signingSecret": "YOUR_SLACK_SIGNING_SECRET",
"botToken": "xoxb-YOUR-BOT-TOKEN"
},
"groupPolicy": "open",
"requireMention": true
}'The response includes a webhookUrl. Copy it.
Step 3: Configure the Webhook in Slack
- Back in your Slack app settings, go to Event Subscriptions
- Toggle Enable Events to On
- Paste the webhook URL from step 2 into the Request URL field — Slack will verify it immediately
- Under Subscribe to bot events, add:
app_mentionmessage.im
- Save changes
Done. @mention your bot in any channel, or DM it directly. It'll respond using your agent.
Channel Options for Slack
| Option | Description |
|---|---|
groupPolicy: "open" | Bot responds in any channel it's added to |
groupPolicy: "disabled" | Bot only responds to DMs |
groupPolicy: "allowlist" | Bot only responds in specific channels (pass allowedGroups) |
requireMention: true | In group channels, only respond when @mentioned |
allowedSenders: ["U12345"] | Only these Slack user IDs can talk to the bot |
Discord
Step 1: Create a Discord Application
- Go to discord.com/developers/applications and click New Application
- Name it and go to the Bot section
- Click Reset Token and copy the Bot Token
- Go to General Information and copy the Public Key
- Under Bot, enable:
- Message Content Intent (required to read message text)
- Generate an invite URL: OAuth2 → URL Generator → Select
botscope +Send Messages+Read Message Historypermissions - Use the URL to invite the bot to your server
Step 2: Create the Channel
curl -X POST https://api.universalapi.co/channels \
-H "Authorization: Bearer YOUR_UAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "discord-assistant",
"platform": "discord",
"agentId": "YOUR_AGENT_ID",
"platformConfig": {
"publicKey": "YOUR_DISCORD_PUBLIC_KEY",
"botToken": "YOUR_DISCORD_BOT_TOKEN"
},
"groupPolicy": "open",
"requireMention": true
}'Step 3: Configure the Interaction Endpoint
- In your Discord app settings, go to General Information
- Paste the
webhookUrlfrom the channel response into the Interactions Endpoint URL field - Discord will verify it automatically
Done. @mention the bot in any channel or DM it.
Telegram
Telegram is the simplest — no OAuth, no signing secrets, just a bot token.
Step 1: Create a Telegram Bot
- Open Telegram and message @BotFather
- Send
/newbotand follow the prompts - Copy the bot token (looks like
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)
Step 2: Create the Channel
curl -X POST https://api.universalapi.co/channels \
-H "Authorization: Bearer YOUR_UAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "telegram-assistant",
"platform": "telegram",
"agentId": "YOUR_AGENT_ID",
"platformConfig": {
"botToken": "YOUR_TELEGRAM_BOT_TOKEN"
}
}'That's it. Universal API automatically registers the webhook with Telegram's API. No extra configuration needed. Open your bot in Telegram and start chatting.
TIP
For Telegram, the webhook is auto-registered when you create the channel. If you delete the channel, the webhook is automatically deregistered too.
WhatsApp
WhatsApp uses Meta's Business API. You'll need a Meta Business account and a WhatsApp Business phone number.
Step 1: Set Up Meta Business
- Go to developers.facebook.com and create an app with WhatsApp product
- In the WhatsApp section, note your Phone Number ID and generate a permanent access token
- Create a verify token (any random string you choose)
Step 2: Create the Channel
curl -X POST https://api.universalapi.co/channels \
-H "Authorization: Bearer YOUR_UAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "whatsapp-assistant",
"platform": "whatsapp",
"agentId": "YOUR_AGENT_ID",
"platformConfig": {
"verifyToken": "your-random-verify-string",
"accessToken": "YOUR_META_ACCESS_TOKEN",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID"
}
}'Step 3: Configure the Webhook in Meta
- In the Meta developer dashboard, go to WhatsApp → Configuration
- Set the Callback URL to your channel's
webhookUrl - Set the Verify Token to the same string you used above
- Subscribe to the
messageswebhook field
Generic Webhook
Want to connect something custom? The webhook platform accepts any JSON POST:
curl -X POST https://api.universalapi.co/channels \
-H "Authorization: Bearer YOUR_UAPI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "custom-webhook",
"platform": "webhook",
"agentId": "YOUR_AGENT_ID",
"platformConfig": {
"secret": "optional-hmac-secret"
}
}'Then POST messages to the webhook URL:
curl -X POST YOUR_WEBHOOK_URL \
-H "Content-Type: application/json" \
-d '{"message": "Hello, agent!", "senderId": "user-123"}'The response contains the agent's reply. Use this to integrate with any platform — internal tools, IoT devices, custom apps.
Managing Channels via the Dashboard
All of this is also available through the Universal API dashboard:
- Go to Channels in the sidebar
- Click Create Channel
- Select your platform, enter credentials, pick an agent
- The webhook URL is displayed immediately — copy and configure
You can also pause, resume, or delete channels from the dashboard. The Test button sends a test message through the channel to verify everything is wired up correctly.
Tips
Use requireMention: true in group channels. Without it, the bot responds to every single message in the channel. With it, the bot only responds when @mentioned — much less noisy.
Set up sender allowlists for internal bots. If the agent has access to sensitive data (internal docs, customer records), restrict who can talk to it using allowedSenders.
Monitor for errors. If a channel hits 3 consecutive failures (agent error, timeout, etc.), it auto-pauses with status: "error". Check your Channels page and Logs for details, then resume when the issue is fixed.
Same agent, multiple platforms. You can connect the same agent to Slack, Discord, Telegram, and a website embed simultaneously. Conversations are tracked separately per platform.
Quick Reference
| Platform | Config Needed | Webhook Auto-Registered? |
|---|---|---|
| Slack | signingSecret + botToken | No — paste URL in Event Subscriptions |
| Discord | publicKey + botToken | No — paste URL in Interactions Endpoint |
| Telegram | botToken | ✅ Yes — automatic |
verifyToken + accessToken + phoneNumberId | No — paste URL in Meta dashboard | |
| Webhook | secret (optional) | N/A — you call the URL directly |
Time per platform: ~2 minutes. Most of it is copying credentials.
For the full API reference, see the Channels documentation. Questions? Sign up free and try it.