Telegram integration

Telegram Bot API: messages, chats, media, inline keyboards, updates

Help CentreConnectors

Overview

Telegram Bot API covers messages, chats, media, inline keyboards, updates. The Automize Telegram connector covers the Bot API.

  • Regions: Global (Telegram restricted in some countries).
  • Plans: Free.

Setting up the connection

Auth type: API Key.

  1. Telegram → message @BotFather → /newbot → receive bot token.
  2. In Automize → Settings → Connectors → Telegram. Paste token.

Find your credentials at https://t.me/BotFather.


Rate limits

~30 msg/sec to different chats; 1 msg/sec per chat.


Data model

Bot primitives:

    Bot ─── Chats (users + groups + channels) ─── Messages
                                                ├─ Inline Keyboards
                                                └─ Media (photos, docs, audio)

Available operations

20 operations available. Click any row to jump to its detail.

OperationCategoryWhat it does
Ban MemberGeneralBan a user from a chat
Delete messageGeneralDelete a Telegram message.
Edit messageGeneralEdit a Telegram message.
Forward MessageGeneralForward a message to another chat
Get chatGeneralGet Telegram chat information.
Get chat members countGeneralGet the number of members in a Telegram chat.
Get FileGeneralGet file download path by file_id
Get meGeneralGet the Telegram bot user info.
Get updatesGeneralGet Telegram bot updates.
Pin messageGeneralPin a message in a Telegram chat.
Send audioGeneralSend an audio message via Telegram.
Send contactGeneralSend a contact card via Telegram.
Send documentGeneralSend a document via Telegram.
Send locationGeneralSend a location via Telegram.
Send messageGeneralSend a text message via Telegram.
Send photoGeneralSend a photo via Telegram.
Send videoGeneralSend a video message via Telegram.
Send voiceGeneralSend a voice message via Telegram.
Set webhookGeneralSet a Telegram bot webhook URL.
Unban MemberGeneralUnban a user from a chat

Operations

Ban Member

Ban a user from a chat

ParameterRequiredTypeDescription
Chat Id chat_idYestext
User Id user_idNotext

Delete message

Delete a Telegram message.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Message Id message_idYestext

Edit message

Edit a Telegram message.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Message Id message_idYestext
Text textYestext

Forward Message

Forward a message to another chat

ParameterRequiredTypeDescription
Chat Id chat_idYestext
From Chat Id from_chat_idNotext
Message Id message_idNotext

Get chat

Get Telegram chat information.

No input parameters.


Get chat members count

Get the number of members in a Telegram chat.

No input parameters.


Get File

Get file download path by file_id

No input parameters.


Get me

Get the Telegram bot user info.

No input parameters.


Get updates

Get Telegram bot updates.

No input parameters.

Tips

  • Long-polling for new messages. Or use webhook.

Pin message

Pin a message in a Telegram chat.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Message Id message_idNotext

Send audio

Send an audio message via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Audio audioNotext
Caption captionNotext

Send contact

Send a contact card via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Phone Number phone_numberNotext
First Name first_nameYestext
Last Name last_nameNotext

Send document

Send a document via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Document documentYestext
Caption captionYestext

Send location

Send a location via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Latitude latitudeNonumber
Longitude longitudeNonumber

Send message

Send a text message via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Text textYestext
Parse Mode parse_modeYestext
Reply Markup reply_markupYestext

Tips

  • chat_id + text. parse_mode (Markdown/HTML) for formatting.
  • reply_markup for inline keyboards.

Send photo

Send a photo via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Photo photoYestext
Caption captionYestext

Tips

  • chat_id + photo (URL or file).

Send video

Send a video message via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Video videoNotext
Caption captionNotext

Send voice

Send a voice message via Telegram.

ParameterRequiredTypeDescription
Chat Id chat_idYestext
Voice voiceNotext
Caption captionNotext

Set webhook

Set a Telegram bot webhook URL.

ParameterRequiredTypeDescription
Url urlYestext

Tips

  • Push-mode delivery to your endpoint. Preferred over polling.

Unban Member

Unban a user from a chat

ParameterRequiredTypeDescription
Chat Id chat_idYestext
User Id user_idNotext

FAQ

Bot vs User account API?
Bot API: official, free, what this connector uses. User API (MTProto): account-impersonation, breaks ToS for most uses.

Related connectors

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.