Telegram
A channel or group your own bot posts to. Threads, albums, png and jpeg.
#Overview
Post to a Telegram channel or group through a bot you own. A connection is one chat, not one bot, so a bot that is a member of three chats is three connections.
Telegram posts are free to send. The chat counts as one connected account, like LinkedIn or Bluesky. See pricing.
#How to connect
- Message @BotFather and send
/newbotto get a bot token. - Add the bot to your channel as an admin with permission to post messages, or to your group as a plain member.
- In yeetpost, click Add connection, then Telegram, and paste the token, then press Connect.
Connect autodetects the chat: it reads the bot's own Telegram updates for what it was
just added to and connects that, no channel id needed. More than one match and it asks
which; none found and it asks you to add the bot first, or to paste the chat yourself
(its public @handle, a t.me link, or its numeric id starting with -100 for a
private one). All of token, chat and membership are checked when you connect, so a
connection that exists is one that can post. A private chat (a one-on-one with the bot)
cannot be connected, and neither can an invite link: paste the chat's own link or id
instead.
Autodetection only works while the bot has no webhook of its own pointed elsewhere. A bot already wired to a webhook is told to paste the chat instead.
Your first Telegram connection gets the slug telegram. A second one gets a slug built
from the channel, so @shipnotes becomes shipnotes_telegram. GET /connections
describes it as Ship notes (Telegram).
The connection is identified by the chat id, so renaming the channel does not break it. A bot token never expires. If you revoke it in BotFather, connect again with the new one.
#What works
| Thing | Value |
|---|---|
| Text limit | 4096 characters |
| Text limit with an image | 1024 characters, because the text becomes the photo's caption |
| Images | Up to 5 per post |
| Image formats | image/png and image/jpeg only |
| Alt text | No, Telegram has no field for it, so it is dropped |
| Threads | Yes, up to 24 replies under the head message |
| First comment | No, LinkedIn only (Facebook when it ships) |
| Scheduling | Yes |
| Permalink | https://t.me/<handle>/<message id> for a public channel or supergroup, https://t.me/c/<internal id>/<message id> for a private one. A basic group has no message links at all, so url comes back null |
| Per-post fee | None |
An image turns the text into a caption, and a caption holds a quarter of what a message does. Text over 1024 characters with an image attached is refused rather than split into a photo plus a follow-up message nobody wrote. Send the long text on its own.
Alt text is dropped, silently and per connection. An image's description still travels to every other connection on the same post.
A broken thread is taken back. If Telegram refuses the third reply, the messages this
request already published are deleted, newest first, head included, and the item comes back
failed with Telegram's own error. If one of those deletes is refused too, what is still
up is a shorter thread and the item comes back sent with threadCount at the replies
that survived.
An album is never taken back. Several images go out as one album, which is several
messages a Telegram client shows as one post. Deleting a piece of it would leave the rest
standing with a gap, so when the head carries more than one image only the replies are
deleted. The album stays and the item comes back sent.
A private channel's or group's permalink only opens for members of it.
#Refusals
Every one of these is a per-item refusal: the other connections on the same post still go out. See the errors reference for the full vocabulary.
| Code | Status | When |
|---|---|---|
invalid_request | 400 | Text over 4096 characters, or over 1024 with an image attached |
media_unsupported | 400 | The image is not a png or a jpeg |
shape_unsupported | 400 | A firstComment was given. Telegram has no first comment |
unauthorized | 401 | The bot token was revoked. Connect again with the new one |
platform_rejected | 422 | Telegram refused the message, for example the bot lost its admin rights |
internal_server_error | 500 | Our fault. Quote the req_id when you report it |
The image check runs before anything is sent, so a gif aimed at Telegram never reaches the channel and never blocks the other connections on the post.
#Post from curl
curl -X POST https://api.yeetpost.com/api/v2/posts \
-H "x-api-key: $YEETPOST_API_KEY" \
-H "content-type: application/json" \
-d '{
"text": "release 2.4.0 is out",
"connectionSlugs": ["telegram"],
"thread": ["changelog: https://yeetpost.com/changelog"]
}'#Post from Node
const response = await fetch("https://api.yeetpost.com/api/v2/posts", {
method: "POST",
headers: {
"x-api-key": process.env.YEETPOST_API_KEY,
"content-type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
text: "release 2.4.0 is out",
connectionSlugs: ["telegram"],
mediaIds: [process.env.SCREENSHOT_MEDIA_ID],
}),
});
const data = await response.json();
console.log(data.results[0].status, data.results[0].url);Remember the caption rule when you attach an image: with mediaIds set, the text has to
fit in 1024 characters.
#FAQ
#Can I post to a group or to a person?
Channels and groups, yes; private chats with a person, no. Add the bot to a group as a plain member (a channel still needs it as an admin) and Connect picks it up the same way as a channel. A one-on-one with the bot cannot be connected: paste the chat's own link or id if autodetection does not find what you meant.
#Why does my gif come back media_unsupported?
Telegram takes png and jpeg photos only. The check runs before the post is sent, so the same post still goes out to every other connection on it.
#Why did my alt text disappear?
Telegram has no field for a photo description. yeetpost drops it for this connection and still sends it to X, Bluesky, Mastodon and LinkedIn on the same post.
#How do I find a private channel's id?
It is the numeric id starting with -100. Most Telegram clients show it in the channel
info, and forwarding a message from the channel to a bot such as @userinfobot returns it.
#Does the bot need any other permission?
Only "post messages". yeetpost checks for exactly that when you connect and refuses the connection if the bot is not an admin that can post.