Telegram
Using hosted SimplePost? See connection requirements. The credential setup below is for your own SDK, local CLI, or self-hosted integration.
Telegram is the simplest provider to set up. SimplePost posts through a bot token and a target chat ID. There is no OAuth flow.
Content support
Current hosted app and core source
| Capability | SimplePost support |
|---|---|
| Text / caption (characters) | 4,096 text; 1,024 caption |
| Media | 10 items max; Mixed media supported |
| Image size | 10 MiB maximum |
| Video size | 50 MiB maximum |
- SimplePost downloads URL media and uploads it to Telegram using multipart/form-data.
These validation limits also match published SDK 1.3.1.
Provider permissions and quotas still apply. SimplePost storage can impose a lower upload limit. MB/GB use decimal bytes; MiB/GiB use binary bytes.
Set up credentials
1. Create a bot
- Open Telegram and start a chat with BotFather.
- Send
/newbot. - Follow the prompts.
- Copy the bot token.
2. Get the chat ID
For a public channel or group, you can often use the handle:
@your_channel
For private chats or groups:
- Add the bot to the chat.
- Send a message in the chat.
- Call
getUpdateswith the bot token:
curl "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/getUpdates"
- Find
chat.idin the response.
Environment variables
TELEGRAM_BOT_TOKEN=
The chat ID is not read from any env var. Pass it through options.telegram.chatId on every SDK call, or store it on the local CLI account / accounts.json entry as platformAccountId.
SDK options
await post({
content: { text: "Hello <b>Telegram</b>" },
platforms: ["telegram"],
options: {
telegram: {
chatId: "@mychannel",
parseMode: "HTML",
},
},
});
parseMode can be HTML, Markdown, or MarkdownV2. Note that Telegram requires aggressive escaping in MarkdownV2 (every _*[]()~\>#+-=|.!must be escaped); pickHTML` if you do not need that level of control.
Reply to an existing message:
await post({
content: { text: "Replying" },
platforms: ["telegram"],
options: {
telegram: { chatId: "@mychannel", replyTo: "12345" },
},
});
REST server account
Add this entry under accounts in the self-hosted REST server's accounts.json:
{
"id": "telegram-news",
"platform": "telegram",
"platformAccountId": "@your_channel",
"credentials": { "botToken": "123456:ABC..." },
"options": { "parseMode": "HTML" }
}