Skip to content

Migrating from Telegram

The GROM Bot API mirrors the Telegram Bot API on purpose. Method names, parameter names, response shapes and the update model are the same, so most bot code runs unchanged once the base URL points here.

Most. This page is about the rest — the parts that do not carry over, and the ones that look like they do but do not.

Not yet possible

The gateway is not deployed and no token can be issued. Nothing here can be attempted today. Read it as a plan, not as instructions. Implementation status.

What changes in your code

One line:

diff
- https://api.telegram.org/bot<TOKEN>/sendMessage
+ https://api.casinoplaneta.info/bot<TOKEN>/sendMessage

Most libraries expose this as a setting rather than a fork:

python
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer

session = AiohttpSession(
    api=TelegramAPIServer.from_base("https://api.casinoplaneta.info")
)
bot = Bot(token=GROM_TOKEN, session=session)
javascript
const bot = new Bot(GROM_TOKEN, {
  client: { apiRoot: 'https://api.casinoplaneta.info' },
})
php
$base = "https://api.casinoplaneta.info/bot{$token}";
Http::post("{$base}/sendMessage", ['chat_id' => $chatId, 'text' => $text]);

If your library hardcodes the host with no override, that is the only code change needed — and it is usually one constant.

What does not carry over

This is the part that catches people. Everything in this section is data you already have that becomes worthless on GROM.

User and chat ids

A person's GROM id has no relationship to their Telegram id. They are separate platforms with separate identity spaces. Your table of telegram_user_id cannot be translated, mapped, or looked up — there is no correspondence to discover.

In practice: your bot starts with an empty audience. Every user must find it and message it again, and you learn their GROM id the same way you learned their Telegram one — from an incoming update. A bot cannot message someone who has not contacted it first, so there is no way to reach your existing users through the bot itself. Announce the move on a channel they already follow.

File ids

file_id values are issued by the platform that stored the file. A Telegram file_id means nothing here. Media has to be re-uploaded once, after which GROM issues its own ids that you can re-send cheaply.

If your bot ships a fixed set of assets — stickers, images, documents — plan an upload step on first run and cache the returned ids.

Usernames

Your Telegram bot's @username is not reserved for you here. Register early if the name matters to you.

Anything Telegram-account-shaped

Stars balances, Premium status, existing subscriptions, gifts, saved payment methods — all Telegram account state. None of it exists on GROM.

What is not implemented

Beyond ids and files, some of the surface is documented but has no implementation behind it — and some of it is not even decided yet.

AreaState
Every methodPlanned. The gateway returns 404. See status
PaymentsDocumented, but the currency model is genuinely undecided — see below
MTProtoNo MTProto layer exists. Bots that use a userbot library will not work
Business botsSpecified only
Sticker set managementDocumented, unimplemented

Payments deserve a warning

The payments methods are written to the Telegram shape, but the underlying question — what currency a GROM bot actually charges in — has not been answered. The project specification references Telegram-style Stars while GROM's own internal token is called Take, and the two have not been reconciled. No payment provider is connected.

Treat those signatures as provisional. If your bot's revenue depends on them, do not plan a migration date around them yet. More detail.

What behaves the same

  • Update delivery: long polling and webhooks, update_id ordering, at-least-once semantics
  • chat_id sign conventions: positive private, negative group, -100 channel
  • Entity offsets in UTF-16 code units
  • parse_mode with MarkdownV2 and HTML
  • Inline keyboards, callback_query, and the requirement to answer them
  • The rule that a bot cannot initiate a conversation
  • Error envelope shape and error_code values

Rate limits are in the same range but not identical — check Limits rather than assuming your existing pacing transfers.

A realistic order

  1. Point a copy of your bot at the new base URL and get getMe answering.
  2. Re-upload static assets, store the new file_ids.
  3. Run both bots in parallel. There is no shared state between them, so there is nothing to synchronise — but also nothing to migrate.
  4. Rebuild your audience. This is the slow part, and no API call shortens it.

The honest summary: the code moves in an afternoon, the users do not move at all. Anyone promising otherwise is selling something.