Documentation
Integrate ads into your Telegram Mini App
Getting Started
Everything you need to start earning with your Telegram Mini App.
SW AdFlow helps you earn money from your Telegram Mini App by showing ads to your users. You are paid for verified ad views — no guesswork.
Prerequisites
- A working Telegram Mini App (a bot with a Web App)
- Basic JavaScript knowledge
- Your App ID from the SW AdFlow dashboard (looks like
SWA-7K2M9Q4X) - Your Mini App served over HTTPS (Telegram requires it)
How it works
- Create your account and verify your email.
- Submit your Mini App — its WebApp URL and bot link (
https://t.me/your_bot). - We review it, usually within 1–2 business days.
- Get your code. Open Publisher → Apps and click Code next to your app.
- Add the code to your Mini App and start showing ads.
- Track earnings in Statistics, then withdraw your available balance.
Installation
Add the SW AdFlow SDK to your HTML <head>:
<script src="https://shohojworldit.my.id/ads/sdk.js?id=YOUR_APP_ID"></script>
Replace YOUR_APP_ID with your App ID — or copy the ready-made code from the Code button.
Basic integration
Show a rewarded ad and handle the result:
window.showAdFlow()
.then(() => {
// ✅ Grant the user reward (e.g. coins, points)
console.log('Ad completed! Reward granted.');
})
.catch(e => {
// ❌ Handle errors (e.g. no ad available)
console.error('Ad failed:', e);
});
Still stuck? Our team is happy to help.
Contact Support