How to Connect a Telegram Channel or Group to PostHub
Telegram has no OAuth button, so posting runs through your own bot. This guide covers @BotFather, the /newbot command, chat ids, admin rights and the exact steps to connect — from zero to a published post.
TELEGRAM
Every other network in PostHub hands you an "Allow" button. Telegram does not, because Telegram has no third-party "post to my channel" permission to grant. The official way for an app to publish into a channel or group is a bot — and a bot is something you create yourself, in about two minutes, inside the Telegram app.
That is what this guide walks through. By the end you will have a bot of your own, it will be an admin of your channel, and PostHub will be publishing through it.
Why a bot, and is it safe?
A bot is an account Telegram creates for automated scripts. It cannot message real people who have not started it, it cannot read your private chats, and you can delete it whenever you want. What it can do is whatever admin rights you give it inside your channel — and that is exactly the permission PostHub needs to publish.
The bot token you will copy in step 4 is the password to that bot. Treat it like a password: PostHub stores it encrypted, you should never paste it into a chat or a screenshot.
Step 1 — Open BotFather
- 1Open Telegram on your phone or desktop.
- 2Tap the search icon and type BotFather — the official account is exactly @BotFather (with the @). It has a verified checkmark and a robot avatar.
- 3Open the chat and press Start (or send
/start) if it is a new conversation.
BotFather is Telegram's own dashboard for bots. It creates them, lets you rename them, change their avatar, and — important later — revoke a token you think has leaked.
Step 2 — send the /newbot command
Type the command in the message box at the bottom of the BotFather chat, exactly like you would text a friend:
/newbotPress send. The /newbot command is the "create a bot" command; there is no button to press, you simply type the slash command and send it. If the menu above the input field shows command suggestions, tap /newbot there instead — same thing.
BotFather replies asking for a name for your bot.
Step 3 — choose the display name
This is the human-readable name, and it can be anything:
PostHub PublisherMy Channel PostsIt can contain spaces, emoji, whatever you like. This is the name people see if they ever open the bot's profile. Send it.
Step 4 — choose the username (the one that must end in "bot")
BotFather now asks for a username. This one has rules:
- It must be unique across all of Telegram.
- It must be at least 5 characters.
- It must end in `bot` (case-insensitive):
PostHubPublisherBot,mychannel_postsbot,xyz123bot.
Send it. If the username is taken, BotFather says so and asks again — try adding your handle or a number.
On success BotFather replies with a green block containing your HTTP API token. It looks like this:
123456789:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsawThe part before the colon is a number, the part after the colon is a long letters-and-numbers string. Copy it now — this is the "Bot token" PostHub will ask for. You can always come back to BotFather, send /mybots, pick your bot and open API Token to see or revoke it, but copying it once saves the detour.
Anyone holding this token controls your bot. If it ever lands somewhere it should not, open /mybots → your bot → API Token → Revoke; a fresh token immediately invalidates the old one (and you will need to update it in PostHub).
Step 5 — make the bot an admin of your channel or group
The bot now exists, but it cannot post anywhere yet. A bot only acts inside chats it has been added to, with exactly the rights it has been given.
For a channel:
- 1Open your channel in Telegram.
- 2Tap the channel name → Administrators → Add Admin.
- 3Search for your bot's username (the one ending in
bot) and select it. - 4Toggle on at least: Post messages, Edit messages, and Delete messages (edit/delete let PostHub fix or remove a post that went out wrong).
- 5Tap Save.
For a group:
- 1Open the group → tap the group name → Administrators → Add Admin.
- 2Search the bot username, select it, grant Post messages (and edit/delete if you want them).
- 3Save.
Two things people miss here:
- Pinned messages: if you want PostHub to pin a post after publishing, grant Pin messages too.
- Restricted default: in groups, bots are silent until promoted. If you only "added" the bot without making it an admin, publishing will fail with a "not enough rights" error.
Public or private makes no difference — the bot must simply be an admin of that specific chat.
Step 6 — connect the bot in PostHub
- 1In PostHub, open Connected Accounts from the sidebar.
- 2Find Telegram and press Connect.
- 3Pick Add a new bot (or Use existing bot if you have connected one before and want to reuse it).
- 4Paste the token BotFather gave you.
- 5Press Next.
PostHub calls Telegram with the token, confirms the bot really exists, and shows you the chat step.
Step 7 — tell it where to post (the chat id)
The second field is the destination. You have two options:
Public channel or group: just use its username, with the @:
@mychannelPrivate channel, private group, or anything without a username: you need the numeric chat id. Channels and private groups use ids that start with -100:
-1001234567890How to find the chat id
- 1Copy any message from the target channel or group.
- 2Paste it into a chat with @userinfobot (an independent helper bot; @getidsbot works too). Forwarding is enough — you do not need to type anything.
- 3It replies with the chat id. For channels and private groups the id begins with
-100. For a private direct chat it is a plain number.
The same instructions are inside the connect modal — press How do I find this? under the chat field and it opens with the steps.
Then, back in PostHub:
- 1Type the username or the
-100…id. - 2Optionally pick a group (workspace folder) for this account.
- 3Press Connect.
PostHub does one final check — it asks Telegram for that chat's info through your bot — and if the bot is an admin and can post, the connection saves and the account card turns green.
Step 8 — publish something to prove it
Create a post in the PostHub composer, pick the Telegram account, and hit publish. Within a few seconds the message should land in the channel, with its media and formatting intact. That is the whole loop working.
When something goes wrong
"Bot was kicked from the chat" — the bot was removed at some point. Re-add it as admin (step 5) and try again.
"Not enough rights" / 403 Forbidden — the bot is in the chat but not an admin, or it is an admin without Post messages. Open the admin list and check the toggles.
"Chat id not found" — the bot cannot see that chat. It must be a member (admin) of it. For channels double-check the -100 prefix was not dropped, and that you copied the id from a bot that can see the chat — forwarding a message to @userinfobot is the reliable way.
Token rejected — the token was revoked from /mybots or copied with a stray space or line break. Copy it again, or regenerate and update it in PostHub.
Wrong bot got connected — Telegram allows a workspace to hold several bots. Disconnect the account in Connected Accounts and reconnect with the right token, or use Use existing bot to pick from the ones already connected.
The bot posts, but not where I expected — you gave PostHub a different chat id than the channel you were watching. Disconnect, reconnect, and re-enter the destination.
Good hygiene
- Revoke tokens you are no longer using (
/mybots→ API Token → Revoke) and remove bots from chats you have abandoned. - One bot per purpose is fine — Telegram does not charge for bots, and separating "the PostHub bot" from anything else keeps revocation simple.
- The token lives encrypted inside PostHub; rotating it later is a two-minute reconnect.
Quick reference
| Thing | Where | | --- | --- | | Create a bot | Telegram → search @BotFather → send /newbot | | The token | BotFather's reply after /newbot, or /mybots → API Token | | Make admin | Channel/Group → Administrators → Add Admin → your bot | | Public destination | @username | | Private destination | chat id like -1001234567890 (forward a message to @userinfobot) | | Revoke a token | /mybots → your bot → API Token → Revoke |
Once the account is green in Connected Accounts you never have to think about BotFather again — PostHub keeps the token encrypted and renews nothing, because bot tokens do not expire. The only reason to come back is to rotate one.
Put this playbook on autopilot
PostHub queues, publishes and reports across every platform you use — so the strategy above actually happens without you babysitting a tab.