Steps to Add a Menu Button for Launching a Web App:
-
Go to BotFather:
- Open Telegram and search for
BotFather
. - Select the bot you've created.
- Open Telegram and search for
-
Navigate to Your Bot Settings:
- Type or select the
/mybots
command. - Choose your bot from the list.
- Type or select the
-
Configure the Menu Button:
- Click Bot Settings.
- Select Menu Button.
- You can now set up a custom button with the URL of your mini-app:
- Add a button label (e.g., "Open Mini-App").
- Enter your web app URL (ensure it uses HTTPS).
-
Save Your Settings:
Once you configure and save, this button will appear in your bot’s chat menu.
Result:
Users will see the "Open Mini-App" button directly in the bot’s menu, which, when clicked, opens your web application within Telegram.
This is the preferred method for launching mini-apps from a bot!
Comments