Skip to content

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 → Platform

When 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

Slack

Step 1: Create a Slack App

  1. Go to api.slack.com/apps and click Create New AppFrom scratch
  2. Name it (e.g., "AI Assistant") and select your workspace
  3. Under OAuth & Permissions, add these Bot Token Scopes:
    • chat:write — Send messages
    • app_mentions:read — Respond when @mentioned
    • channels:history — Read messages in public channels
    • im:history — Read DMs
  4. Install the app to your workspace and copy the Bot User OAuth Token (xoxb-...)
  5. Go to Basic Information and copy the Signing Secret

Step 2: Create the Channel

bash
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

  1. Back in your Slack app settings, go to Event Subscriptions
  2. Toggle Enable Events to On
  3. Paste the webhook URL from step 2 into the Request URL field — Slack will verify it immediately
  4. Under Subscribe to bot events, add:
    • app_mention
    • message.im
  5. Save changes

Done. @mention your bot in any channel, or DM it directly. It'll respond using your agent.

Channel Options for Slack

OptionDescription
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: trueIn 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

  1. Go to discord.com/developers/applications and click New Application
  2. Name it and go to the Bot section
  3. Click Reset Token and copy the Bot Token
  4. Go to General Information and copy the Public Key
  5. Under Bot, enable:
    • Message Content Intent (required to read message text)
  6. Generate an invite URL: OAuth2 → URL Generator → Select bot scope + Send Messages + Read Message History permissions
  7. Use the URL to invite the bot to your server

Step 2: Create the Channel

bash
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

  1. In your Discord app settings, go to General Information
  2. Paste the webhookUrl from the channel response into the Interactions Endpoint URL field
  3. 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

  1. Open Telegram and message @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the bot token (looks like 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11)

Step 2: Create the Channel

bash
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

  1. Go to developers.facebook.com and create an app with WhatsApp product
  2. In the WhatsApp section, note your Phone Number ID and generate a permanent access token
  3. Create a verify token (any random string you choose)

Step 2: Create the Channel

bash
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

  1. In the Meta developer dashboard, go to WhatsApp → Configuration
  2. Set the Callback URL to your channel's webhookUrl
  3. Set the Verify Token to the same string you used above
  4. Subscribe to the messages webhook field

Generic Webhook

Want to connect something custom? The webhook platform accepts any JSON POST:

bash
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:

bash
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:

  1. Go to Channels in the sidebar
  2. Click Create Channel
  3. Select your platform, enter credentials, pick an agent
  4. 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

PlatformConfig NeededWebhook Auto-Registered?
SlacksigningSecret + botTokenNo — paste URL in Event Subscriptions
DiscordpublicKey + botTokenNo — paste URL in Interactions Endpoint
TelegrambotToken✅ Yes — automatic
WhatsAppverifyToken + accessToken + phoneNumberIdNo — paste URL in Meta dashboard
Webhooksecret (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.

Universal API — The agentic entry point to the universe of APIs