How to monetize a Telegram bot without sharing the token: the idea
HiViews has two integration modes. With a token, the network sends the ad on the bot’s behalf: one API call on your side. Without a token, your own code does the sending: the bot asks the network whether there is an ad for this person, receives a ready post and sends it itself.
Whether sharing a token is risky, and what an ad network can do with it, is a separate topic covered in Is it safe to share your Telegram bot token with an ad network? This article is the practical part: how to connect the bot, what to check in the code and what you are paid for.
What you need:
- a bot that real people use;
- access to that bot in @BotFather, to edit its About text;
- the ability to add one function and two calls to the bot’s code.
Telegram bot ads without a token: five steps to connect
-
Add the bot in the dashboard
In the web dashboard, open the bot connection page and choose “Without a token”.
-
Prove the bot is yours
The dashboard shows a short code. Put it into the bot’s About text: @BotFather → Edit Bot → Edit About. That code is how HiViews knows you control the bot.
-
Get the API key
Once ownership is confirmed you get an API key. The bot passes moderation like any other bot on the network. In its settings you can choose which formats to sell and refuse certain ad categories.
-
Paste the ready function
The docs have ready code for Python (aiogram), Node.js (Telegraf) and PHP. The function requests a post and sends it with the right method — photo, video, GIF or plain text. All that is left is to insert your key.
-
Call it in two places
In the /start handler with
StartPlace: true, before the bot’s own greeting. And after the bot has delivered its result to the user, withStartPlace: false.
The general rules for bot owners are in the guide for bot owners.
The ad request: what the bot sends and what it gets
There is one request: POST https://hiviews.net/api/partner/ad with an Authorization header that carries the API key.
| Field | What to send |
|---|---|
UserId | The user’s Telegram ID. Required |
UserFirstName | The user’s first name — it is used in posts that address the person by name |
Username | The user’s @username, if there is one |
Language | The user’s Telegram interface language |
StartPlace | true on /start, false after the result is delivered |
The answer is always JSON. If there is an ad, you get "ok": true and an ad object: text, buttons and, where present, a photo, video or GIF. Send it to the user as is. If nothing fits, you get "ok": false and the bot simply carries on. A delete_after field, when present, means the post should be deleted after that many seconds.
An empty answer is normal, not an error. The network protects users: one person sees at most one ad per hour and six per day across all bots, and a welcome ad in a given bot no more than once a day.
How Telegram confirms that the post was sent
Without a token the network cannot see whether the bot really sent the post. So Telegram itself confirms it: the text of the post starts with an invisible link, and when the bot actually sends the message, Telegram requests that link. That is how HiViews knows the post went out to the user.
Three rules follow, and payment does not work without them:
- Keep link previews on. Do not set
disable_web_page_preview: with previews off Telegram never requests the link, and the sending stays unconfirmed. - Do not change the text. Do not strip links, rewrite the post or add anything of your own to it.
- Leave the buttons alone. Button links go through hiviews.net — that is how clicks are counted. A click on a changed link is not paid.
The main rule of the no-token mode: send the post exactly as you received it. A post whose sending Telegram did not confirm is not paid: neither the impression nor the clicks on it.
Paid impressions without a bot token: what is paid from day one
Every campaign from the start
A bot without a token gets every campaign of the network from the start: welcome and regular impressions, pay-per-impression campaigns and fixed-price click campaigns at $0.04 per click. There is no separate approval and no waiting. External ads are shown when no campaign of the network fits the viewer; they are paid per click only, the price varies a lot by country and audience, and the income is credited the next day.
How an impression is confirmed
Each impression whose sending Telegram itself confirmed is paid: the post carries a hidden link, and Telegram’s servers fetch it when the message is sent. So the bot must send the post exactly as received and keep link previews on. An unconfirmed post is not paid.
The rate per impression
The rate per impression without a token is lower than with one. With a token it is $4.80 per 1,000 welcome and $2.40 per 1,000 regular impressions, and no confirmation is needed, because HiViews sends the ad itself. Clicks on pay-per-click ads are paid as before — $0.04 per click.
What takes paid impressions away
Every ad link goes through HiViews tracking, and the network knows how often the same campaigns are clicked in bots with a token. A bot whose clicks do not match its impressions — far fewer or far more than expected — automatically loses paid impressions and goes back to pay-per-click only. A bot that does not really send most of the posts it takes stops getting ads. There are click-level safeguards too: at most one paid click per IP address per hour, and payment pauses when the click rate is implausibly high. How the network tells a real audience from an inflated one is covered in Fake traffic in Telegram bots.
Earnings become withdrawable after 7 days, withdrawals start at $50 in USDT TRC20, and earnings can also be moved to the ad balance. Details are in the finance guide.
With a token and without: what is different
| Aspect | Without a token | With a token |
|---|---|---|
| Who sends the ad | Your bot | HiViews |
| How ownership is proved | A code in the bot’s About text | The BotFather token |
| Integration | A ready function: request the post and send it | One API call |
| What is paid from day one | Every confirmed impression, and clicks | Every impression, and clicks |
| Paid impressions | At once, for confirmed impressions; at a lower rate | At once: $4.80 per 1,000 welcome and $2.40 per 1,000 regular impressions |
| Which campaigns the bot gets | Every campaign, from day one | Every campaign |
| What confirms an impression | Telegram requests the hidden link in the text | The network sends the post itself |
You can switch modes at any time: paste the token on the bot’s page in the dashboard. There is no new moderation, the API key stays the same and the code does not change — the same request keeps working, and impressions start being paid at the full rate. Other ways to earn with a bot are in How to monetize a Telegram bot.
Common integration mistakes
- Requesting the regular ad before the result. First give the person what they came for — the file, the answer, the video — and only then request the ad. That keeps the post as the last message in the chat; otherwise the result pushes it out of sight at once.
- Changing the post. Your own text on top, trimmed lines, replaced buttons or links — and the sending is not confirmed and the post is not paid.
- Disabling link previews. They are often switched off globally in the bot’s or the library’s defaults. For the ad message, previews must be on.
- Sending StartPlace incorrectly.
truebelongs only in the /start handler.falsegoes after the bot has delivered its result. The same value in every call is a mistake. - Requests with no user action. Request an ad in response to something the person really did, not on a timer and not as a broadcast. Faking parameters is against the rules.
- Letting the ad break the bot. Set a timeout on the request and catch errors, as the ready code does: if the network does not answer, the bot must keep working.
FAQ
Can I earn from my bot without sharing its token?
Yes. You prove ownership with a code in the bot’s About text, get an API key, and the bot requests and sends the ads itself. The BotFather token is not needed.
What is paid in the no-token mode?
Each impression whose sending Telegram confirmed, and clicks: on fixed-price click campaigns and on external ads. The bot gets every campaign of the network from the start. The rate per impression is lower than with a token.
Why must link previews stay on?
The text of the post starts with an invisible link, and Telegram requests it at the moment the message is sent. That confirms the post really went out to the user. Without previews there is no confirmation, and that post is not paid.
What happens if I add the token later?
You paste the token on the bot’s page in the dashboard. There is no new moderation, the API key stays the same, the code does not change, and impressions are paid at the full rate right away.
Which languages have ready code?
Python (aiogram), Node.js (Telegraf) and PHP — in the docs section on connecting without a token.