> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatbotplatform.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding New Channels

> Guide for adding new channel types to your bot

This guide explains how to add new messaging platform channels to your bot. Chatbot Platform supports multiple channels simultaneously, allowing you to deploy your bot across different platforms.

## Supported Channels

Currently supported messaging platforms:

> [card] [Telegram](https://docs.chatbotplatform.io/bots/channels/telegram.md)
>
> Native bot API support

> [card] [Slack](https://docs.chatbotplatform.io/bots/channels/slack.md)
>
> OAuth and webhook events

> [card] [Discord](https://docs.chatbotplatform.io/bots/channels/discord)
>
> Coming soon

## Adding a Channel

### General Process

**1. Navigate to Channels**

From your bot dashboard, click **Channels** in the sidebar.

![Channels page](https://mintlify.s3.us-west-1.amazonaws.com/chatbotplatform/images/screenshots/03-channels/01_channels_page.png)

Bot channels page

**2. Create Channel**

Click **Create Channel** and select the platform type.

**3. Configure Credentials**

Enter the required credentials for the platform:

* **Telegram**: Bot token from BotFather
* **Slack**: Bot token, signing secret, app ID
* **Discord**: Bot token and application ID (coming soon)

**4. Verify Connection**

The platform will verify the credentials and establish the connection.

**5. Test**

Send a test message through the channel to verify it works.

## Platform-Specific Setup

### Telegram

**Prerequisites**:

* Telegram account
* Bot token from [@BotFather](https://t.me/BotFather)

**Setup Time**: \~2 minutes

**Required Information**:

* Bot token (format: `123456789:ABCdefGHIjklMNOpqrsTUVwxyz`)

**Configuration**:

1. Create bot in BotFather
2. Copy token
3. Paste into Chatbot Platform
4. Webhook auto-configured

[Detailed Telegram Setup Guide →](https://docs.chatbotplatform.io/bots/channels/telegram.md)

### Slack

**Prerequisites**:

* Slack workspace admin access
* Ability to create Slack apps

**Setup Time**: \~10 minutes

**Required Information**:

* Bot User OAuth Token (`xoxb-...`)
* Signing Secret
* App ID

**Configuration**:

1. Create Slack app at api.slack.com/apps
2. Configure OAuth scopes
3. Install to workspace
4. Copy credentials
5. Configure event subscriptions
6. Paste webhook URL

[Detailed Slack Setup Guide →](https://docs.chatbotplatform.io/bots/channels/slack.md)

### Discord (Coming Soon)

**Prerequisites**:

* Discord account
* Bot application in Discord Developer Portal

**Setup Time**: \~5 minutes

**Required Information**:

* Bot token
* Application ID
* Public key

**Configuration**:

1. Create application in Discord Developer Portal
2. Create bot user
3. Copy token and IDs
4. Paste into Chatbot Platform
5. Configure intents and permissions

## Multiple Channels

You can connect multiple channels to a single bot:

### Benefits

> [card] One Backend
>
> Same AI integration serves all platforms

> [card] Unified Management
>
> Configure behaviors once, apply everywhere

> [card] Separate Contexts
>
> Each platform maintains independent conversations

> [card] Cross-Platform Reach
>
> Deploy to all major messaging platforms

### Example Configuration

```
Bot: "Customer Support"
├── Telegram Channel
│   ├── Token: 123456789:ABC...
│   └── Status: Active
├── Slack Channel
│   ├── Workspace: company.slack.com
│   └── Status: Active
└── Discord Channel (coming soon)
    ├── Server: Company Discord
    └── Status: Coming Soon
```

Each channel operates independently but shares:

* Integration configuration
* Bot behaviors (typing, detection)
* Message history settings

## Channel-Specific Features

Different platforms support different features:

| Feature | Telegram | Slack | Discord |
| - | - | - | - |
| Native Typing | ✅ Yes | ✅ Yes | Coming Soon |
| Threads | ❌ No | ✅ Yes | Coming Soon |
| Group Chats | ✅ Yes | ✅ Yes | Coming Soon |
| Direct Messages | ✅ Yes | ✅ Yes | Coming Soon |
| Media Messages | ✅ Yes | ⚠️ Limited | Coming Soon |
| Buttons/Actions | ⚠️ Future | ⚠️ Future | Coming Soon |
| Slash Commands | ✅ Yes | ⚠️ Future | Coming Soon |

✅ Fully supported | ⚠️ Partial or future support | ❌ Not supported

## Managing Channels

### Viewing Channels

See all connected channels on the bot's channels page:

```
Telegram Channel
├── Name: Telegram Bot
├── Status: Active
├── Created: 2024-01-15
└── Last Message: 2 minutes ago

Slack Channel
├── Name: Company Slack
├── Status: Active
├── Workspace: company.slack.com
└── Last Message: 5 minutes ago
```

### Disabling a Channel

Temporarily disable a channel without deleting:

**1. Go to Channel Settings**

Click on the channel you want to disable.

**2. Disable**

Toggle the **Active** switch to off.

**3. Confirm**

Channel will stop receiving messages but configuration is preserved.

**When Disabled**:

* Bot stops responding to messages
* Webhook is deregistered (if applicable)
* Configuration is saved
* Can be re-enabled anytime

### Deleting a Channel

Permanently remove a channel:

Deleting a channel is permanent. Conversations and configuration will be lost.

**1. Open Channel**

Navigate to the channel you want to delete.

**2. Delete**

Click **Delete Channel**.

**3. Confirm**

Confirm the deletion. This cannot be undone.

### Updating Credentials

To update tokens or credentials:

**1. Edit Channel**

Click **Edit** on the channel.

**2. Update Fields**

Update the token, secret, or other credentials.

**3. Save**

Click **Save**. Connection will be re-verified.

## API Management

Manage channels programmatically using the API.

> [accordion] Create a channel
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl -X POST https://api.chatbotplatform.io/v1/bots/bot_123/channels \
> >   -H "Authorization: Bearer YOUR_API_KEY" \
> >   -H "Content-Type: application/json" \
> >   -d '{
> >     "type": "telegram",
> >     "name": "My Telegram Bot",
> >     "config": {
> >       "token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
> >     }
> >   }'
> > ```
>
> > [tab] JavaScript
> >
> > ```javascript theme={null}
> > const response = await fetch('https://api.chatbotplatform.io/v1/bots/bot_123/channels', {
> >   method: 'POST',
> >   headers: {
> >     'Authorization': 'Bearer YOUR_API_KEY',
> >     'Content-Type': 'application/json'
> >   },
> >   body: JSON.stringify({
> >     type: 'telegram',
> >     name: 'My Telegram Bot',
> >     config: {
> >       token: '123456789:ABCdefGHIjklMNOpqrsTUVwxyz'
> >     }
> >   })
> > });
> >
> > const channel = await response.json();
> > console.log('Channel created:', channel.id);
> > ```
>
> > [tab] PHP
> >
> > ```php theme={null}
> > use Illuminate\Support\Facades\Http;
> >
> > $response = Http::withToken('YOUR_API_KEY')
> >     ->post('https://api.chatbotplatform.io/v1/bots/bot_123/channels', [
> >         'type' => 'telegram',
> >         'name' => 'My Telegram Bot',
> >         'config' => [
> >             'token' => '123456789:ABCdefGHIjklMNOpqrsTUVwxyz'
> >         ]
> >     ]);
> >
> > $channel = $response->json();
> > ```
>
> > [tab] Python
> >
> > ```python theme={null}
> > import requests
> >
> > response = requests.post(
> >     'https://api.chatbotplatform.io/v1/bots/bot_123/channels',
> >     headers={'Authorization': 'Bearer YOUR_API_KEY'},
> >     json={
> >         'type': 'telegram',
> >         'name': 'My Telegram Bot',
> >         'config': {
> >             'token': '123456789:ABCdefGHIjklMNOpqrsTUVwxyz'
> >         }
> >     }
> > )
> >
> > channel = response.json()
> > print(f"Channel created: {channel['id']}")
> > ```

> [accordion] List bot channels
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl https://api.chatbotplatform.io/v1/bots/bot_123/channels \
> >   -H "Authorization: Bearer YOUR_API_KEY"
> > ```
>
> > [tab] JavaScript
> >
> > ```javascript theme={null}
> > const response = await fetch('https://api.chatbotplatform.io/v1/bots/bot_123/channels', {
> >   headers: {
> >     'Authorization': 'Bearer YOUR_API_KEY'
> >   }
> > });
> >
> > const { data } = await response.json();
> > console.log(`Found ${data.length} channels`);
> > ```
>
> > [tab] PHP
> >
> > ```php theme={null}
> > $response = Http::withToken('YOUR_API_KEY')
> >     ->get('https://api.chatbotplatform.io/v1/bots/bot_123/channels');
> >
> > $channels = $response->json('data');
> > ```
>
> > [tab] Python
> >
> > ```python theme={null}
> > response = requests.get(
> >     'https://api.chatbotplatform.io/v1/bots/bot_123/channels',
> >     headers={'Authorization': 'Bearer YOUR_API_KEY'}
> > )
> >
> > channels = response.json()['data']
> > print(f"Found {len(channels)} channels")
> > ```

> [accordion] Update a channel
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl -X PATCH https://api.chatbotplatform.io/v1/channels/chan_123 \
> >   -H "Authorization: Bearer YOUR_API_KEY" \
> >   -H "Content-Type: application/json" \
> >   -d '{
> >     "name": "Updated Channel Name",
> >     "active": true
> >   }'
> > ```
>
> > [tab] JavaScript
> >
> > ```javascript theme={null}
> > await fetch('https://api.chatbotplatform.io/v1/channels/chan_123', {
> >   method: 'PATCH',
> >   headers: {
> >     'Authorization': 'Bearer YOUR_API_KEY',
> >     'Content-Type': 'application/json'
> >   },
> >   body: JSON.stringify({
> >     name: 'Updated Channel Name',
> >     active: true
> >   })
> > });
> > ```
>
> > [tab] PHP
> >
> > ```php theme={null}
> > Http::withToken('YOUR_API_KEY')
> >     ->patch('https://api.chatbotplatform.io/v1/channels/chan_123', [
> >         'name' => 'Updated Channel Name',
> >         'active' => true
> >     ]);
> > ```
>
> > [tab] Python
> >
> > ```python theme={null}
> > requests.patch(
> >     'https://api.chatbotplatform.io/v1/channels/chan_123',
> >     headers={'Authorization': 'Bearer YOUR_API_KEY'},
> >     json={
> >         'name': 'Updated Channel Name',
> >         'active': True
> >     }
> > )
> > ```

> [accordion] Delete a channel
>
> > [tab] cURL
> >
> > ```bash theme={null}
> > curl -X DELETE https://api.chatbotplatform.io/v1/channels/chan_123 \
> >   -H "Authorization: Bearer YOUR_API_KEY"
> > ```
>
> > [tab] JavaScript
> >
> > ```javascript theme={null}
> > await fetch('https://api.chatbotplatform.io/v1/channels/chan_123', {
> >   method: 'DELETE',
> >   headers: {
> >     'Authorization': 'Bearer YOUR_API_KEY'
> >   }
> > });
> > ```
>
> > [tab] PHP
> >
> > ```php theme={null}
> > Http::withToken('YOUR_API_KEY')
> >     ->delete('https://api.chatbotplatform.io/v1/channels/chan_123');
> > ```
>
> > [tab] Python
> >
> > ```python theme={null}
> > requests.delete(
> >     'https://api.chatbotplatform.io/v1/channels/chan_123',
> >     headers={'Authorization': 'Bearer YOUR_API_KEY'}
> > )
> > ```

> [card] [Complete API Reference](https://app.chatbotplatform.io/openapi)
>
> View the full API specification with all endpoints, parameters, and response schemas.

## Troubleshooting

### Channel Won't Connect

**Telegram**:

* Verify token is correct and active
* Check for extra spaces in token
* Ensure bot wasn't deleted in BotFather
* Try regenerating token

**Slack**:

* Verify all three credentials (token, secret, app ID)
* Check OAuth scopes are correct
* Ensure app is installed to workspace
* Verify event subscriptions URL

### Webhook Verification Failed

**Slack**:

* Ensure channel is created before pasting webhook URL
* Check webhook URL has no trailing slash
* Verify signing secret is correct
* Try creating new channel if needed

**Discord** (Coming Soon):

* Verify public key is correct
* Check endpoint URL is accessible
* Ensure bot has proper intents

### Messages Not Received

**Check**:

* Channel is active (not disabled)
* Bot has permissions on platform
* Integration is configured
* Platform webhooks are working
* Check error logs for details

### Duplicate Messages

If bot responds multiple times:

* Check for duplicate channels
* Verify only one channel per platform
* Review webhook configuration
* Check for multiple bot instances

## Best Practices

> [card] Test First
>
> Test new channels in private before production

> [card] Monitor Health
>
> Check channel status regularly

> [card] Secure Tokens
>
> Never expose tokens publicly

> [card] Document Setup
>
> Keep notes on channel configurations

Start with one channel and ensure it works perfectly before adding more platforms.

## Future Channels

Upcoming platform support:

### Discord

* Bot application integration
* Server and DM support
* Slash commands
* Embedded messages

### WhatsApp Business

* Business API integration
* Template messages
* Media support
* Interactive buttons

### Microsoft Teams

* Bot framework integration
* Team and channel support
* Adaptive cards
* Meeting integration

Want to see support for a specific platform? [Contact us](mailto:support@chatbotplatform.io) with your request.

## Next Steps

> [card] [Telegram Setup](https://docs.chatbotplatform.io/bots/channels/telegram.md)
>
> Set up Telegram channel

> [card] [Slack Setup](https://docs.chatbotplatform.io/bots/channels/slack.md)
>
> Set up Slack channel

> [card] [Bot Behaviors](https://docs.chatbotplatform.io/bots/behaviors/index.md)
>
> Configure bot behavior


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.