Bot API · Guides
Auto-posting to a channel
A bot can publish to your channel on a schedule: a morning digest, a picture of the day, news from an RSS feed. All you need is a token, the bot as a channel admin and a script.
1. Prepare
- Create a bot: Settings → My bots, copy the token.
- Open your channel → Administrators → Add a bot and choose it.
- Give the channel a public handle — then
chat_idis simply"@handle".
2. The script
pip install requestsimport os, requests
T = os.environ["ORBEO_TOKEN"]
API = f"https://orbeo.me/botapi/bot{T}"
requests.post(f"{API}/sendMessage", json={
"chat_id": "@mychannel",
"text": "<b>Morning digest</b>\nThree things worth reading today…",
"parse_mode": "HTML",
}).raise_for_status()
with open("cover.jpg", "rb") as f:
requests.post(f"{API}/sendPhoto",
data={"chat_id": "@mychannel", "caption": "Picture of the day"},
files={"photo": f}).raise_for_status()parse_mode accepts HTML, MarkdownV2 or Markdown. Text up to 4096 characters, captions up to 1024, files up to 50 MB.
3. Schedule
# every day at 09:00
0 9 * * * ORBEO_TOKEN=123:yourtoken /usr/bin/python3 /home/me/post.pyAny scheduler works: cron, systemd timers, GitHub Actions, a cloud function.
Ideas
- RSS → channel: read a feed, post new items with a link.
- Mirror a Telegram channel into Orbeo.
- Generate a post with an AI model and publish it.
Ready-made versions of these are in the @orbeodev channel inside Orbeo.
If something fails
400 not enough rights to send messages to the chat— the bot is not an admin of the channel.429— too fast; waitretry_afterseconds.400 chat not found— check the handle.
More — Bot API reference.