Skip to content
MGRAMKnowledge Base

How to add a bot

Connecting a bot by token, moderation, and common errors.

Updated October 16, 20263 min read12 views

Connecting a bot to MGRAM takes a couple of minutes. You will need the bot's token from @BotFather.

Where to get the token

  1. Open @BotFather.
  2. Send /mybots and pick your bot.
  3. Tap “API Token” and copy the token — it looks like 123456789:AAH….

Connecting

  1. Open @mgram_robot → “My bots” → “Connect a bot to the platform”.
  2. Bot token. Send the token as a message.
  3. Category. Choose the bot's topic — advertisers find audiences by it. Be honest: a wrong category is a common rejection reason.
  4. The bot goes to moderation. Its status in “My bots” is “In moderation”.

While the bot is being reviewed, MGRAM gathers its audience — the users the bot can send messages to.

Moderation result

  • Approved — you get a “Bot approved” notification. Open “Settings” and set the broadcast slots, see Bot settings.
  • Rejected — the notification states the reason. If you think it's a mistake, contact Support.

Common rejection reasons

ReasonWhat to do
The bot has no usersConnect the bot when it has an audience
Inactive audience — too few active usersMost users have blocked the bot. Revive the bot and connect it again
The category doesn't match the bot's contentChoose the topic that reflects what the bot does
Cloned bot, fake activity, or a policy violationSuch bots are not accepted
The token is invalid or has a wrong formatCopy the token again from @BotFather

How many users are needed

  • A bot with as few as 1 user can be connected: mandatory subscriptions and tasks work right away.
  • Broadcasts and Reply Ads open when the bot has at least 50 users. They turn on automatically once the audience reaches the threshold — the bot sends a notification.

Common errors

  • “Invalid token” — make sure you copied the whole token without spaces.
  • “This bot is already connected to another MGRAM account” — a bot can be connected to one account only. If it's your bot, contact Support.
  • “This bot is already connected to your account” — find it in “My bots”.

If the token stops working

If you reissued or revoked the token in @BotFather, the bot pauses and MGRAM sends a “New token needed” notification.

  1. Open the bot in “My bots” and tap “Update token”.
  2. Send the new token of the same bot.
  3. The bot goes through an audience update and re-moderation. Data and history in MGRAM are kept.

Bots without a token

New bots can be connected only with a token. Bots connected earlier without a token keep working through the Tasks API. To open broadcasts, Reply Ads, and mandatory subscriptions for them, add the token in the bot card — the API key stays the same.

A token gives full access to the bot. Share it only with the official @mgram_robot — MGRAM staff never ask for tokens in private messages.