How to turn the site into a Telegram mini app

← Back

Create a bot with @BotFather, set up a section with the app_tg module, enter the bot token in the module settings and click «Connect bot».

  1. In Telegram, open @BotFather → /newbot. Choose a name and username for the bot and copy the token.
  2. Create a section, for example /tg, with the app_tg module and access set to «Everyone».
  3. In «Module settings», paste the «Bot token». If you like, fill in «Section after login», «Bot menu button label» and «Reply to /start and to any message to the bot».
  4. Open the section page as an administrator and click «Connect bot». The bot will get an "Open" menu button.
  5. Check the items in the «Settings check» block.

A person opens the bot, taps "Open" and gets onto the site under their own account. On first login the account is created automatically, with the name taken from Telegram. Telegram's "Back" button works like in a browser, and links to other sites open separately. Outside Telegram the site works as usual.

To make the app open via a link like t.me/bot/app and appear in Telegram search, run /newapp in @BotFather and enter the address from the «2. Mini app address» block on the section page.

Topping up the balance with stars is described in a separate article.

If it didn't work

  • The «Connect bot» button gives an error. The site must open over HTTPS, and the token must be copied in full.
  • The bot doesn't respond, payment isn't credited. Click «Check polling». If the site hasn't received updates from Telegram for a long time, it's a server setting — contact the platform support.
  • «Login failed». Close the app and open it again from the bot.
Did the article help?

See also

In the help section, you will find answers to frequently asked questions and useful instructions for working with the Site Look website builder. Here you can learn how to manage sections, add objects, and configure the website. The materials will be useful for both beginners and experienced users. If you haven't found an answer, contact support.