Publishers · Getting started

Create an ad block

Pick a block type (Reward, Interstitial, Task), set the Reward URL and copy your integration code.

An ad block is one ad placement in your app — for example “Watch ad for 2× speed” or “Tasks list”. Each block has its own ID, statistics and code.

Choose the block type

TypeWhat the user seesBest forBlock ID looks like
RewardFull-screen video, cannot be skippedCoins, lives, boosters, “one more try”50001
InterstitialFull-screen image/video, closable after 5 sBetween levels, after a result screenint-50002
TaskA small card in your task listEarn pages, daily taskstask-50003

The panel gives every new block a plain number, for example 50001. Some blocks carry a prefix that matches their type — int- for Interstitial, task- for Task — and older blocks use tw-. Copy the ID exactly as the panel shows it; the SDK accepts all three forms.

WARNING

Once your block is approved, its type is locked — the panel will not let you switch it. Want another format? Create a new block instead.

Fill in the form

  • Block name — e.g. “Double coins button”. Only you see it.
  • Block type — Reward, Interstitial or Task. The one you picked is highlighted.
  • Reward URL (optional) — the address on your server that Adsun calls when a user earned the reward. The field shows up for Reward and Task blocks, not for Interstitial. Learn how →
  • Advanced SDK settings (optional) — for Reward and Interstitial: Seconds between ads (0–3600, default 5) and Ads per user / day (1–10000, default 300). For Task blocks: Min. time away (s) (5–600, default 15) and New task after (s) (5–3600, default 30).

Get the code

On the block page press the Block configuration button (the </> icon at the left of Edit). Switch between Basic and All options — the second one lists every init option and event — then press Copy code. Both already contain your real block ID.

<script src="https://api.adsun.io/sdk.js"></script>

<script>
  const AdController = window.Adsun.init({ blockId: "50001" });

  AdController.show()
    .then((result) => {
      // user watched till the end: give the reward
    })
    .catch((result) => {
      // skipped, no ad or error
    });
</script>

Still stuck? Write to support@adsun.io or our Telegram support — we answer fast.