Skip to main content

Telegram API Guide

Publish text, images, image carousels, video, and PDF documents to a Telegram channel through your bot. PostEverywhere uses the Telegram Bot API to deliver content; the bot you connected at setup is the credential — there is no OAuth flow. For a general overview of all supported platforms, see the Introduction.

Connecting a Telegram Account

Telegram uses a bot token plus a target channel. There is no OAuth flow.

  1. Open a chat with @BotFather on Telegram and create a bot. Copy the bot token it gives you.
  2. Add the bot as an administrator of the channel you want to post to. Enable the Post Messages permission.
  3. In your PostEverywhere dashboard, go to Accounts → Connect Telegram and paste:
    • The bot token from BotFather (format: 123456:ABC-DEF1234...)
    • The channel — either @channelusername, a t.me/channelusername link, or a numeric chat ID.

We validate the bot token, confirm the bot can see the channel, and check it has post permission before saving the account. If any of those fail, we surface the exact error so you can fix the setup.

Supported Content Types

Content TypeMedia RequiredDescription
Text postNonePlain text message, up to 4,096 characters.
Image postImageSingle image with optional caption (up to 1,024 chars).
Image carouselImages (2-10)Media group with up to 10 images.
Video postVideo (MP4)Single video with optional caption.
Document postPDFPDF sent as a document attachment.

When the post text exceeds Telegram's 1,024-character caption limit but media is attached, we send the long text as a separate message first, then send the media without a caption — so nothing gets truncated.

Platform-Specific Settings

Telegram has no platform-specific settings object — platform_content.telegram.content lets you override the caption / text per platform, but there are no privacy, comment-control, or reply-restriction fields.

{
"platform_content": {
"telegram": {
"content": "Telegram-specific caption (up to 4,096 chars text, 1,024 chars caption)"
}
}
}

Example: Create a Post

Schedule a Telegram Text Post

curl -X POST https://app.posteverywhere.ai/api/v1/posts \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "New blog post is live — read it here: https://example.com/blog/foo",
"account_ids": [3100],
"scheduled_for": "2026-06-15T12:00:00Z",
"timezone": "UTC"
}'
curl -X POST https://app.posteverywhere.ai/api/v1/posts \
-H "Authorization: Bearer $POSTEVERYWHERE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Launch day photos",
"account_ids": [3100],
"media_ids": [
"11111111-1111-1111-1111-111111111111",
"22222222-2222-2222-2222-222222222222",
"33333333-3333-3333-3333-333333333333"
]
}'

Requirements & Limits

RequirementLimit
Text-only message length4,096 characters
Caption length (with media)1,024 characters
Images per carousel2 - 10 (media group)
Image formatsJPEG, PNG, WebP
Image max file size10 MB (Telegram limit)
Video formatMP4 (H.264)
Video max file size50 MB via bot URL (Telegram limit)
Document formatsPDF
Document max file size50 MB
Bot must be channel adminYes — with "Post Messages" permission
Bot must have "Post Messages" enabled

If you remove the bot from your channel or revoke its post permission, every subsequent publish will fail with "bot can't post to chat". Reconnect via Accounts → Connect Telegram after fixing the permission on Telegram.

Tips

  • Telegram fetches our URLs. We pass media to Telegram as URLs to our storage; Telegram pulls the file. This means very large files (over Telegram's 50 MB ceiling) cannot be sent via the Bot API.
  • Long text + media gets split automatically. If your post text is longer than 1,024 characters but you've attached media, we send the text as a separate message before the media (with no caption on the media). This avoids silent truncation.
  • The bot's display name is the post author. Posts appear authored by the channel, but Telegram shows that the message was sent via a bot. Pick a bot name that makes sense for your channel.

Frequently Asked Questions

How do I connect a Telegram channel?

Create a bot via @BotFather, copy the token, add the bot to your channel as an administrator with "Post Messages" enabled, then go to Accounts → Connect Telegram in your PostEverywhere dashboard. Enter the bot token and the channel (@channelname or a numeric chat ID).

Why did my Telegram post fail with "bot is not an admin"?

The bot was removed from the channel, demoted, or had its "Post Messages" permission revoked. Re-add the bot as an administrator with post permissions, then re-validate the connection by clicking Reconnect on the account in your dashboard.

Can I post to a private Telegram group via the API?

Yes — the bot must be an administrator of the group. We support channels, supergroups, and private groups. Direct messages to users are not supported (Telegram's Bot API restricts that to opted-in users only).

Can I edit a Telegram post after it's published?

No. Telegram's Bot API supports editMessageText and editMessageCaption, but PATCH /v1/posts/:id only accepts scheduled or draft posts. Edits via our API on published posts return 400 invalid_post_status. Edit directly in Telegram if needed.

  • Discord — webhook-based posting to a server channel
  • Bluesky — app-password connection model, similar low-friction setup
  • X (Twitter) — short-form text with thread support

Further Reading