Skip to content

How to create BlockId?


Sign up

Create your account on https://partner.adsgram.ai/registration

Registration

WARNING

If you have already connected to our network as an advertiser and launched campaigns, it is important to authorize in the publisher's account under the same login that you used to register in the advertiser's account.
So we automatically won't show ad that lead to your app inside your app.


Create Ad Platform

Click Create... and choose Ad platform.

Create platform

App name — convenient for you name of your App.
Telegram direct link — direct link to your telegram app.
Web app url — the url of your application where it's hosted.

INFO

App owner can get Telegram direct link and Web app url in BotFather using command /myapps.

Get Telegram direct link and Web app url

Bot ID — unique identifier for your bot on telegram.

INFO

App owner can get Bot ID in BotFather using command /mybots and click on API Token button.

Get bot info

The first part of API Token before colon is the Bot ID.

Get bot id

WARNING

If you want to test in dev/test version of your app, you should create another platform for dev environment with Telegram direct link, Web app url of your dev app, otherwise you will get an error like this 👇

Wrong referrer error

Banning the display of Gambling

By contacting our support @adsgramsupport, you can ask to turn off the impressions of advertisers from the Gambling category on your site.

DANGER

Disabling it will lead to a significant decrease in your income.


Create Ad unit

Click Create... and choose Ad unit.

Create blockName — the name of the block is convenient for you.
Ad Platform — previously created platform. Choose platform in dropdown menu.
Block type — the type of the block you want to show. Choose block type in dropdown menu. Can be Reward or Interstitial

Reward URL Optional

It makes sense for publishers who have more than 50k daily average users.
It's used in addition to the standard client-side callback that is used in show function, after user gets reward on client side, we send GET request with user telegramId to your reward url. To connect the server confirmation of the reward for the user, your endpoint must meet the following conditions:

  • Accepts GET request.
  • This is https request, that means port will be 443.
  • Has [userId] part, the [userId] part of the string will be replaced with the Telegram ID of the user. Example: https://test.adsgram.ai/reward?userid=[userId]

WARNING

In debug mode request won't be sent as debug view does not count as real ad view.

TIP

If you display ads in several places inside the web app. For a better understanding of where users watch ads and you earn, it is convenient to use several blocks. Statistics for each block will be displayed separately on the platform page.
Up to 10 ad units can be created for one ad platform.

Blocks

Moderation

After the block is created, it must go through moderation.
To pass moderation, send a message to @adsgramsupport with:


Copy BlockID

In the right top corner click <> Show code and then Copy BlockID. Use this blockId in your code.