What is a Telegram Mini App?
A Telegram Mini App is a web page that Telegram opens inside the chat, full screen, from a bot’s menu button, an inline button or a t.me link. Telegram passes the user’s identity to the app in a signed form, so there is no sign-up: the user taps and is already in. The app can take payments in Telegram Stars or crypto, show ads, and talk to the bot that owns it.
Every Mini App belongs to a bot. The bot is the identity and the door (its /start message, its menu button, its notifications); the Mini App is the screen. That is why every tutorial starts with a bot.
What we build in this tutorial
A tap game like Hamster Kombat, called FoxTap: tap a fox for coins, energy that refills over time, a Multitap boost, a leaderboard, refer and earn, and withdrawals in GRAM to a TON wallet. It is a good first project because it touches everything a real Mini App needs: server-side rules, a referral system, ads, money going out and users coming in.
- Time: about an hour, most of it testing
- Cost: free to build with the daily credits; ads and users are optional
- Code: none written by you — the AI writes and tests it
Step 1 — Create the bot
- Open Mini Agent in Telegram
Search for Mini Agent, open it and tap Start, then New bot.
- Get a token from BotFather
Send /newbot to @BotFather, choose a name (what players see) and a username ending in “bot”. Copy the token: it is the bot’s password, never post it.
- Paste the token in Mini Agent
Mini Agent deletes your message at once, so the token never stays in the chat. The bot is live, with zero players.
Step 2 — Describe the app, like you would to a friend
Open the builder from the Mini Agent button and make the window bigger: desktop mode shows the chat on the left and real test phones on the right. Then write what you want in one message, for example: “a tap game like Hamster Kombat called FoxTap: tap a fox for coins, 500 energy that refills, a multitap boost, top players, refer and earn (2,000 coins + 10% of friends’ taps), withdraw coins as GRAM”.
Mini Agent plans it, writes the bot’s code and the Mini App, and runs the tests before you see it. One rule it applies in every tap game: the phone cannot be trusted. Taps go to the server in batches and the server checks each batch against the energy, so nobody can send ten thousand fake taps.
Step 3 — Test it like a player, then fix what breaks
A first version is never perfect. Create a test account, open the game and play. In our run three things were wrong, and each one is typical:
| What we saw | Why | What we told the AI |
|---|---|---|
| The fox was tiny on a small phone | A fixed size instead of one relative to the screen | “The fox is tiny on small phones” |
| Energy did not refill with the app closed | The phone counted the refill, not the server | “Energy doesn’t refill with the app closed” |
| A friend joining paid 2,000 coins at once | The bonus paid on join, so fake accounts could farm it | “Pay the bonus after the friend taps 300 times” |
Step 4 — Earn with Monetag ads
- On Monetag’s side
Sign up at publishers.monetag.com, open Telegram Mini Apps, add your app with its name and t.me link, click Get SDK and copy the script tag (it carries your zone ID).
- In Mini Agent
Paste the tag and ask for two things: a rewarded ad that refills the energy, and automatic interstitials.
- The postback
Mini Agent gives you a postback URL. Paste it in your Monetag zone: the reward is paid only when Monetag itself confirms the ad, so a browser cannot fake it.
- Tune the timing
If an interstitial pops up in the middle of tapping, say so: “only show it when the app opens”. Ads that interrupt the core action cost you players.
Step 5 — Real withdrawals
Withdrawal rules and the money live in the bot’s ⚙️ Admin panel, the same one every bot has, opened from the bot’s own chat. In Economy you set the rate, the minimum withdrawal and the friend bonus. In Wallet you create the bot’s own GRAM wallet (a free API key from @tonapibot, then 24 secret words shown once).
When the wallet is empty, a withdrawal waits on hold — nothing is lost — and the bot tells you to top up. Send GRAM to the wallet’s address and, on the next cycle, the withdrawal pays itself and both the player and you get a notice.
Step 6 — Publish and get your first users
Everything you tested lives in a draft. Publish puts it live with one tap, and Undo or Versions take you back without spending credits.
Then the step most people get stuck on: the first users. A new Mini App with no players looks dead and teaches you nothing. Buy a first cohort of real Telegram users — 50 for $0.99, counted only when they join — and watch where they stop. Fix that, then buy more at a lower price per user.
Real cost of an active player = campaign price ÷ players who finish the first useful actionCommon questions
Is a Telegram Mini App free to build?
With Mini Agent you can build it with the daily gift of up to 1,000 free credits in 7 days, enough for a first app. Hosting comes with it. You pay only for more AI credits, optional users and, if you want, removing the platform branding.
Do I need to know how to code?
No. You describe what you want and what you saw while testing; Mini Agent writes, tests and publishes the code.
How do Telegram Mini Apps make money?
Ads (Monetag and other networks, best as rewarded ads confirmed by a postback), Telegram Stars payments, and selling items or upgrades. Rewards and withdrawals must be funded by what the app earns.
Can players withdraw real crypto?
Yes, in GRAM, USDT or TRX from the bot’s own wallet, with a minimum, a queue and anti-fraud checks set in the Admin panel.
How do I get users for my Mini App?
Share it where your audience already is, and start with a small paid cohort: Mini Empire delivers 50 real Telegram users for $0.99, each counted once and only when they join.
Sources and further reading
Technical and product claims were checked against these primary sources.