Skip to main content

Telegram Bot

Connect a Telegram Bot to SendSeven to send and receive messages on Telegram. Telegram bots support text, images, documents, audio, video, buttons, reactions, contact cards, and stickers.

Prerequisites

  • A Telegram Bot created via @BotFather
  • The bot token from BotFather
  • A SendSeven API token with channels:create scope

Create a Telegram Channel

Step 1: Get Your Bot Token

  1. Open Telegram and message @BotFather
  2. Send /newbot and follow the prompts to create a bot
  3. BotFather gives you a token like 123456789:ABCdefGHIjklMNOpqrsTUVwxyz

Step 2: Register the Channel in SendSeven

curl -X POST "https://api.sendseven.com/api/v1/channels" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"type": "telegram",
"name": "Customer Support Bot",
"config": {
"bot_token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
}
}'

SendSeven automatically sets up the Telegram webhook to receive incoming messages.

Response

{
"id": "ch_tg_new",
"type": "telegram",
"name": "Customer Support Bot",
"is_active": true,
"bot_username": "AcmeSupportBot",
"created_at": "2026-02-10T16:00:00Z",
"updated_at": "2026-02-10T16:00:00Z"
}

Telegram Capabilities

FeatureSupported
TextYes
ImageYes
DocumentYes
AudioYes
VideoYes
Buttons (inline keyboard)Yes
List messagesNo
CarouselNo
ReactionsYes
Contact cardsYes
StickersYes
Read receiptsYes

Required Scopes

ScopePurpose
channels:createCreate a Telegram channel
channels:readView channel details and capabilities
channels:updateUpdate channel configuration
channels:deleteRemove a channel
messages:createSend messages through the channel

Send a Message on Telegram

curl -X POST "https://api.sendseven.com/api/v1/messages" \
-H "Authorization: Bearer s7_api_a1b2c3d4e5f6789012345678abcdef00" \
-H "Content-Type: application/json" \
-d '{
"contact_id": "contact_xyz789",
"channel_id": "ch_tg_001",
"text": "Your order has been shipped! Track it here: https://track.example.com/12345",
"message_type": "text"
}'
tip

Unlike WhatsApp, Telegram does not have a messaging window restriction. You can send messages to users at any time, as long as they have started a conversation with your bot.

Next Steps