Skip to main content
Version: Latest

Setting Up the Telegram Channel

Telegram is the simplest channel to set up: just a Bot Token created by @BotFather, with no third-party approval or OAuth process.

Prerequisites

Creating the bot

If you do not have a bot yet:

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Follow the instructions: choose a name and a username (must end in bot)
  4. BotFather will return the Bot Token in the format 1234567890:ABCdefGhIJKlmNoPQRsTUVwxyz

Save this token — you will need it in the next step.

Connecting the channel

In the Hub Chatt2.me dashboard:

  1. Go to Channels → Activate/Configure → Telegram
  2. Enter the Bot Token obtained from BotFather
  3. Click Connect

The Hub configures the Telegram webhook automatically. The channel UUID will be available after the connection.

Identifying the recipient (to)

The to field on Telegram is the chat_id — an integer (can be negative for groups) that identifies the conversation.

How to get the chat_id

The most reliable way is via webhook: when the user sends a message to your bot, the chat_id is in the received payload.

Alternatively, you can use the Telegram API directly:

curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates

The chat_id appears in result[].message.chat.id.

Supported content types

Telegram has one of the most complete sets of message types:

  • Text
  • Image (with optional caption)
  • Video (with optional caption)
  • Audio (with optional caption)
  • Document / file (with name and MIME type)
  • Sticker (via image URL)
  • Location (latitude and longitude)
  • Single or multiple contacts
  • Poll via interactive type
  • Message reaction
  • Reply (replying to a specific message)

Media formats and limits

The Hub uploads Telegram media with multipart so it can use Telegram's larger upload limits rather than the smaller remote-URL limits.

TypeFormats currently accepted by the HubOutbound limitInbound download limit
PhotoJPEG, PNG, GIF, WebP, BMP10 MB20 MB
AudioMP3/MPEG, M4A/MP4, FLAC, WAV, OGG, AAC; WebM input is converted to M4A50 MB20 MB
VideoMP4, MOV/QuickTime, AVI, MKV, WebM50 MB20 MB
DocumentAny MIME except SVG, HTML and JavaScript MIME types blocked by the Hub50 MB20 MB
StickerWebP, WebM, TGSWebP: 50 MB transport; WebM: 256 KB; TGS: 64 KB20 MB

Telegram can render MP3/M4A as music and MP4 as video. Other accepted formats may be presented by Telegram as files depending on the client. Voice messages received as OGG/Opus continue through the Hub's existing MP3 conversion so customer webhooks receive a broadly playable audio URL.

Sticker files must also meet Telegram's codec, duration and dimension requirements. The 50 MB WebP value is the multipart transport ceiling, not a promise that an arbitrary image is a valid sticker.

The Telegram Bot API cannot download inbound files larger than 20 MB through getFile. The message metadata can still arrive, but the Hub cannot promise a durable media URL for a larger file. A raw Telegram file URL is never exposed because it contains the bot token.

Sending to groups

If your bot is added to a group, the group's chat_id is a negative number (e.g. -1001234567890). The bot needs permission to send messages in the group.

Identifying the sender (from)

In POST /v1/communication/telegram/message, set from to the application channel UUID or the bot username configured for that channel (with or without a leading @). The UUID always works as a fallback. See Sending messages overview.

Next steps