Steps to have the Telegram Mini App (TMA) + Bot running
- Create a Bot on Telegram using Botfather, link to tutorial
- Clone this repo, run
cp .env.sample .env
and use your own Dynamic environment ID by replacingNEXT_PUBLIC_DYNAMIC_ENV_ID
in the.env
file - Deploy your website online. link to tutorial
- Using Botfather, add the website url that should be opened for your TMA. link to tutorial
- Use Bot
TOKEN
from Telegram and your website url as LOGIN_URL in the.env
file. - Run telegram bot
ts-node scripts/bot.ts
. If you do not havets-node
you can install it by runningnpm -g i ts-node
- Go to your Telegram Bot and type
/start