This guide walks you through connecting Telegram so MokonyxSocial can post your Joomla content through a bot you create, delivering it to a chat, group, or channel. One important detail: a bot can only message a chat it has already interacted with — so you'll need to start the bot (or add it to the group/channel as an admin) before it can post, and you'll need to give MokonyxSocial that chat's ID.
What you need
- A Telegram account.
- A bot created through @BotFather, which hands you a bot token.
- The target chat's ID (a user chat, group, or channel), with the bot allowed to post there.
Get your credentials
Bot token bot_token (required)
This is the authorization token for your bot — MokonyxSocial uses it to call the Telegram Bot API. It looks like 123456789:AAExAmPLe-ToKeN_string.
Here's how to get it:
- In Telegram, open a chat with @BotFather (the official bot — look for the verified badge).
- Send
/newbotand follow the prompts: pick a display name, then a username ending inbot(likemoko_onyx_bot). - BotFather replies with your HTTP API token — that
123456789:AA...string. Copy it and paste it into thebot_tokenfield. - Keep it secret. If it ever leaks, use BotFather's
/revokecommand to issue a new one.
Chat ID chat_id (optional)
This identifies the destination chat. A positive number means a private user chat; a large negative number (often starting -100...) means a group or channel. For public channels you can also use @channelusername. Leave it blank only if MokonyxSocial provides a default elsewhere — for real delivery you'll almost always need this.
Here's how to get it:
- First, make sure the bot can reach the chat:
- Private chat: open your bot and press Start (send it any message).
- Group: add the bot to the group.
- Channel: add the bot as an administrator with permission to post messages.
- Then find the ID:
- Easiest way: message the bot (or post in the group), then open
https://api.telegram.org/botin your browser and look for the/getUpdates chat.idvalue in the JSON. - Or forward a message from the target chat to a helper bot like @getidsbot or @userinfobot, which will report the numeric chat ID.
- For a public channel,
@yourchannelnameworks directly.
- Paste the ID — including the leading
-or-100for groups/channels — into thechat_idfield.
Set it up in MokonyxSocial
- In Joomla admin, go to Components → MokonyxSocial → Services → New.
- Choose Telegram.
- Enter your
bot_token(and thechat_idfor your destination). - Click Send Test to verify, then Save & Close and make sure it's Published.
Verify
Open the target chat or channel in Telegram and confirm your bot's test message showed up. It's basically instant.
Troubleshooting
- "401 Unauthorized" — the bot token is wrong or was revoked. Copy it again from BotFather, or issue a new one.
- "400 Bad Request: chat not found" — the
chat_idis wrong, or the bot hasn't interacted with that chat. Start the bot / add it to the group first, then re-fetch the ID. - "403 Forbidden: bot is not a member of the channel chat" — add the bot to the channel as an admin with post permission.
- "can't parse entities" — the message has malformed Markdown/HTML formatting. Simplify or escape the content.
Notes & limits
- The bot has to be started (in a private chat) or added as an admin (in a channel) before it can post — Telegram blocks unsolicited bot messages.
- Text messages cap at 4,096 characters, so longer content gets split or trimmed.
- Rate limits apply — roughly 30 messages/second overall, about 1 message/second to the same chat, and around 20/minute to a group — so avoid bursts.
- You can address a public channel with
@username, but private groups and channels need the numeric-100...ID.