Publishers · Reference
Errors & troubleshooting
What every SDK error means and how to fix it.
When show() fails, result.description contains one of these messages.
| Error | What it means | How to fix |
|---|---|---|
Wrong referer | The ad was requested from a domain that isn't your Web app URL | Open the app from the URL saved on your platform |
Need to use active blockid | Block is paused or still in review | Wait for review or activate the block |
Not found this id | Block ID typo | Copy the ID again from the panel |
Need to specify blockid | init() called without blockId | Pass { blockId: "..." } |
No botId | Platform has no Bot ID | Contact support to add it |
Bad init data | Telegram signature invalid | Open the app through Telegram, not a copied link |
Session too old | App opened more than 4 h / 24 h ago | Ask the user to restart the Mini App |
No available ad | No campaign matches this user right now | Normal — handle onBannerNotFound |
NonStopShow | Ads requested too fast | Wait at least 5 s between ads |
NoUserData | Not running inside Telegram | Test inside Telegram or use debug: true |
Bad signature / Replay | Request was changed or repeated | Don't proxy or cache SDK requests |
VideoLoadTimeout / PlayRequestFailed | Slow network or autoplay blocked | SDK shows a tap-to-play button automatically |
Errors thrown by init()
These appear in the console as an exception, before any ad request is made — they are your own code, not the network:
| Message contains | Cause | Fix |
|---|---|---|
| blockId param should contain only letters, digits, '-' or '_' | The ID was pasted with a space, a quote or a slash | Copy the ID again from the block page |
| debug should be boolean | debug was passed as a string ("true") | Use debug: true without quotes |
| debugBannerType should be one of ... | Typo in the debug format name | Use "RewardedVideo" or "FullscreenMedia" |
| passing container parameter is not allowed | An old snippet passes a container element | Remove container — the ad always opens full-screen |
Common questions
The ad doesn't show at all
- Is the script tag in
<head>? Checktypeof window.Adsun. - Is the block Active? Try
debug: truefirst. - Look at the console for “ADSUN DEBUG LOG”.
My users don't get the reward
- Check that your Reward URL is reachable from the internet (not localhost).
- It's not called in debug mode.
- If anti-fraud rejects the view,
onNotSuitablefires and no reward is sent.
The ad is under Telegram's buttons
The SDK handles safe areas automatically. Make sure you load telegram-web-app.js and keep the SDK up to date.
Still stuck? Write to support@adsun.io or our Telegram support — we answer fast.