OverviewPlatformsAPI ReferenceResources
All platforms

Telegram

Messaging

Publish text, photos, videos, documents and albums to Telegram channels and groups with the Zernio API, edit published messages, and handle the connected group or channel in the inbox.

Authentication details

Connecting accounts guide
Bot Token

Connect endpoints

Read the full connect steps in the guide

Publish text, photos, videos, documents and albums to a Telegram channel or group with POST /v1/posts and platform: "telegram". Messages in the connected group or channel reach the inbox; private DMs to the bot are not stored.

Quick reference

PropertyValue
Text limit4,096 characters (text messages)
Caption limit1,024 characters (media captions)
Images per album10
Videos per album10
Mixed mediaYes (images and videos in the same album)
Image formatsJPEG, PNG, GIF, WebP
Image max size10 MB (auto-compressed)
Video formatsMP4, MOV
Video max size50 MB (auto-compressed)
SchedulingYes
Editing published postsYes (text or caption, media cannot be changed)
Inbox (DMs)Connected group or channel only (private DMs to the bot are not stored)
Inbox (comments)No
AnalyticsNo (Telegram limitation)

Before you start

Telegram requires Zernio's bot, @LateScheduleBot (shown as "Social Media Connector"), to be an administrator of your channel or group with permission to post.

There is no OAuth and there are no scopes. What the bot can do comes from the admin permissions you grant it.

In a channel, posts appear as the channel's name and logo. In a group, posts appear as sent by "Social Media Connector", and that cannot be changed.

Add @LateScheduleBot as an administrator with the Post Messages permission before you connect.

A bot that is a plain member, or an admin without post permission, is the most common setup failure.

The connect call returns 400 and every post fails with "Bot is not a member of the channel".

Connect

Call GET /v1/connect/telegram with profileId to generate an access code, valid for 15 minutes.

The user adds the bot to the channel or group and sends it the code. You poll until the connection completes.

The full flow, with code for every step, is on Connect.

Publish a post

This request sends an HTML-formatted message to a Telegram channel or group right away.

TypeScript
const { data: published } = await zernio.posts.createPost({
  body: {
    content: '<b>Release 2.3 is out.</b>\n\nRead the <a href="https://example.com/changelog">changelog</a>.',
    platforms: [
      {
        platform: 'telegram',
        accountId: '66b2e19d8c3f5a7e9d0b1c2d',
        platformSpecificData: { parseMode: 'HTML' }
      }
    ],
    publishNow: true
  }
});

console.log(published.post.platforms[0].platformPostUrl);

Every option is on Publish.

In this section

Was this page helpful?

On this page