• Applicable Software: MokonyxSocial
  • Min Version Number: 01.03.00 and later
  • Max Version Number: Not Applicable

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:

  1. In Telegram, open a chat with @BotFather (the official bot — look for the verified badge).
  2. Send /newbot and follow the prompts: pick a display name, then a username ending in bot (like moko_onyx_bot).
  3. BotFather replies with your HTTP API token — that 123456789:AA... string. Copy it and paste it into the bot_token field.
  4. Keep it secret. If it ever leaks, use BotFather's /revoke command 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:

  1. 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.
  1. Then find the ID:
  • Easiest way: message the bot (or post in the group), then open https://api.telegram.org/bot/getUpdates in your browser and look for the chat.id value 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, @yourchannelname works directly.
  1. Paste the ID — including the leading - or -100 for groups/channels — into the chat_id field.

Set it up in MokonyxSocial

  1. In Joomla admin, go to Components → MokonyxSocial → Services → New.
  2. Choose Telegram.
  3. Enter your bot_token (and the chat_id for your destination).
  4. 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_id is 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.