Skip to main content
Connect your bot to Telegram using the Telegram Bot API. Telegram bots support native typing indicators, inline buttons, media messages, and work in groups and private chats.

Prerequisites

Before setting up a Telegram channel, you need:
  • A Telegram account
  • Access to @BotFather bot
  • A bot token from BotFather

Creating a Telegram Bot

1

Open BotFather

Start a chat with @BotFather on Telegram.
2

Create New Bot

Send the command:
/newbot
3

Choose Name

BotFather will ask for a name. Enter a display name for your bot:
My Support Bot
4

Choose Username

Enter a username (must end in “bot”):
my_support_bot
5

Copy Token

BotFather will provide a token:
123456789:ABCdefGHIjklMNOpqrsTUVwxyz
Copy this token - you’ll need it for the next step.
Keep your bot token secret. Anyone with the token can control your bot.

Connecting to Chatbot Platform

1

Navigate to Channels

In Chatbot Platform, go to your bot and click Channels.
2

Create Telegram Channel

Click Create Channel and select Telegram.
3

Enter Token

Paste the bot token from BotFather.
4

Save

Click Create to establish the connection.
5

Webhook Auto-Configuration

The platform automatically configures the webhook with Telegram’s API.

Features

Native Typing Indicators

Telegram supports native typing indicators via the sendChatAction API:
User: "Hello"
Bot: [shows typing animation with three dots]
Bot: "Hi! How can I help?"
Enable typing indicators in bot behavior settings.

Group Chats

Bots work in Telegram groups with per-user context:
  • Each user has separate conversation history
  • Bot can respond to @mentions or all messages
  • Group context is maintained per user
To add bot to a group:
  1. Add bot as group member
  2. Grant admin permissions if needed
  3. Configure group privacy settings in BotFather

Private Chats

Direct 1:1 conversations with users:
  • Simple conversation context
  • Full message history
  • Native features like buttons and media

Inline Buttons

Future support for inline buttons and actions:
Question: "Do you want to continue?"
[Yes] [No]

Configuration

Bot Privacy Settings

Configure in BotFather with /setprivacy: Privacy Mode Disabled:
  • Bot receives all group messages
  • Can respond to any message
  • Required for full conversation context
Privacy Mode Enabled:
  • Bot only receives messages with @mention
  • Or commands starting with /
  • Limited context awareness

Group Permissions

For groups, the bot needs:
  • Read Messages: Receive messages
  • Send Messages: Reply to users
  • Send Media: Images, files, etc.
Configure in group settings or make bot an admin.

Testing

1

Find Your Bot

Search for your bot username in Telegram.
2

Start Chat

Click Start or send /start.
3

Send Message

Send a test message.
4

Verify Response

The bot should respond using your configured integration.

Troubleshooting

Bot Not Responding

Check:
  • Token is correct
  • Channel is enabled
  • Bot has integration configured
  • Webhook is registered (check platform logs)

Bot Not Receiving Group Messages

Possible causes:
  • Privacy mode is enabled (disable in BotFather)
  • Bot needs @mention
  • Bot not added to group
Solution:
  • Use /setprivacy in BotFather
  • Set to disabled
  • Re-add bot to group if needed

Webhook Errors

If webhook registration fails:
  • Verify token is valid
  • Check token has no extra spaces
  • Regenerate token in BotFather if needed

Advanced Features

Commands

Register bot commands in BotFather:
/start - Start conversation
/help - Get help
/settings - Configure preferences
Use /setcommands in BotFather.

Custom Keyboard

Future support for custom keyboards with predefined buttons.

Media Messages

Bot can receive and process:
  • Photos
  • Documents
  • Audio
  • Video
  • Location (latitude, longitude, and optional metadata)
When a user shares their location in Telegram, your integration receives the location data in the message payload, allowing you to build location-aware features like finding nearby places or providing directions.

Security

Token Security

Never share or expose your bot token publicly

Webhook Validation

Platform validates all requests are from Telegram

Rate Limiting

Telegram enforces rate limits on bot API calls

Spam Protection

Implement spam detection in your integration if needed

Rate Limits

Telegram enforces these limits:
ActionLimit
Messages to same chat1 per second
Messages to different chats30 per second
Messages to same group20 per minute
The platform handles rate limiting automatically.

Best Practices

Test your bot in a private chat before adding to groups to ensure it works correctly.
Do:
  • Set clear bot description in BotFather
  • Configure bot commands for better UX
  • Use typing indicators for longer responses
  • Handle media messages gracefully
Don’t:
  • Share bot token publicly
  • Spam users with messages
  • Forget to test group behavior
  • Leave privacy mode enabled if you need full context

Next Steps

Slack Channel

Also deploy to Slack

Bot Behaviors

Configure typing and detection