Monetize your Telegram Mini App with rewarded, interstitial and task ads from Adsun, an independent Telegram ad network. Publishers earn USDT.
- Website: https://adsun.io
- SDK docs: https://adsun.io/docs
- Mini App monetization guide: https://adsun.io/telegram-mini-app-monetization
- Support: support@adsun.io · Telegram @ADSunSupport · Channel t.me/adsunio
Adsun is not affiliated with Telegram's official Ad Platform.
Create a free publisher account at adsun.io, add your Mini App and create a Reward, Interstitial or Task block.
<script src="https://telegram.org/js/telegram-web-app.js"></script>
<script src="https://api.adsun.io/sdk.js"></script>const ad = window.Adsun.init({ blockId: "YOUR_BLOCK_ID", debug: true });
ad.show()
.then(() => { /* watched to the end */ })
.catch((r) => { /* skipped, no ad or error: r.description */ });Set debug: true while testing (test ad, no stats, no Reward URL). Interstitial block IDs start with int-.
<adsun-task data-block-id="task-YOUR_BLOCK_ID">
<span slot="reward">+100 coins</span>
</adsun-task>
<script>
const t = document.querySelector("adsun-task");
t.addEventListener("reward", (e) => console.log("task done", e.detail));
t.addEventListener("onBannerNotFound", () => t.remove());
</script>In the Adsun panel set a Reward URL such as https://yourgame.com/reward?userid=[userId]. Adsun calls it only after a server-verified full watch or task claim. Grant rewards from this callback, not from the client .then() alone. See examples/server/reward-callback.js.
onStart, onSkip, onReward, onComplete, onError, onBannerNotFound, onNonStopShow, onTooLongSession
| File | What |
|---|---|
examples/vanilla.html |
Plain HTML/JS Mini App |
examples/react/useAdsun.ts |
React hook |
examples/react/Task.tsx |
React task block |
examples/vue/useAdsun.vue.ts |
Vue composable |
examples/unity/Adsun.jslib |
Unity WebGL bridge |
examples/server/reward-callback.js |
Node.js Reward URL handler |
types/adsun.d.ts |
TypeScript types |
Booster multipliers · "one more life" after game over · ads as currency to top up a balance · an "Earn" page with tasks.
Learn more: Rewarded ads · Interstitial ads · Task ads · Bot monetization
MIT License