Observed since 20 Oct, 19:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Adstelo Python SDK — Monetize your Telegram bot with one line of code
Monetize your Telegram bot with a single line of code.
Adstelo lets you earn revenue from ads displayed in your Telegram bot — just add two lines to your existing bot and start earning.
bot_secret + api_key.adstelo.init(...) once at the top of your bot code.Security: Your Telegram bot token is never transmitted. Only an opaque
bot_secretis sent. All requests are HMAC-signed with your API key.
pip install adstelo
Requires Python 3.7+. The only dependency is aiohttp.
import adstelo
adstelo.init(
bot_secret="your-bot-secret", # From your Adstelo dashboard
api_key="your-api-key", # From your Adstelo dashboard
)
# ... rest of your bot code, completely unchanged
That's it. The SDK auto-detects whichever Telegram library you have installed and patches it transparently.
import adstelo
from aiogram import Bot, Dispatcher
# ✅ Initialize Adstelo BEFORE creating the Dispatcher
adstelo.init(
bot_secret="your-bot-secret",
api_key="your-api-key",
)
bot = Bot(token="YOUR_BOT_TOKEN")
dp = Dispatcher()
@dp.message()
async def handle_message(message):
await message.answer("Hello!")
# Run your bot as usual
import asyncio
asyncio.run(dp.start_polling(bot))
import adstelo
from telegram.ext import Application, MessageHandler, filters
# ✅ Initialize Adstelo BEFORE building the Application
adstelo.init(
bot_secret="your-bot-secret",
api_key="your-api-key",
)
async def handle_message(update, context):
await update.message.reply_text("Hello!")
app = Application.builder().token("YOUR_BOT_TOKEN").build()
app.add_handler(MessageHandler(filters.TEXT, handle_message))
app.run_polling()
Synchronous:
import adstelo
import telebot
# ✅ Initialize Adstelo BEFORE creating the TeleBot instance
adstelo.init(
bot_secret="your-bot-secret",
api_key="your-api-key",
)
bot = telebot.TeleBot("YOUR_BOT_TOKEN")
@bot.message_handler(func=lambda m: True)
def handle_message(message):
bot.send_message(message.chat.id, "Hello!")
bot.infinity_polling()
Async:
import adstelo
from telebot.async_telebot import AsyncTeleBot
import asyncio
adstelo.init(
bot_secret="your-bot-secret",
api_key="your-api-key",
)
bot = AsyncTeleBot("YOUR_BOT_TOKEN")
@bot.message_handler(func=lambda m: True)
async def handle_message(message):
await bot.send_message(message.chat.id, "Hello!")
asyncio.run(bot.polling())
import adstelo
from telethon import TelegramClient, events
# ✅ Initialize Adstelo BEFORE creating the TelegramClient
adstelo.init(
bot_secret="your-bot-secret",
api_key="your-api-key",
)
client = TelegramClient("my_bot", api_id=12345, api_hash="your_api_hash")
client.start(bot_token="YOUR_BOT_TOKEN")
@client.on(events.NewMessage)
async def handle_message(event):
await event.reply("Hello!")
client.run_until_disconnected()
| Parameter | Type | Required | Description |
|---|---|---|---|
bot_secret | str | ✅ Yes | Your bot's secret from the Adstelo dashboard. Identifies your bot server-side without exposing your Telegram token. |
api_key | str | ✅ Yes | Your Adstelo API key. Used to authenticate requests and sign payloads. |
cooldown | int | float | ❌ No | Per-user event cooldown in seconds. Default: 2. Prevents duplicate events from rapid interactions. |
bot_secret — unique to each registered botapi_key — tied to your account (used across all your bots)adstelo.init()Your
api_keyis like a password — keep it private and never commit it to version control. Use environment variables:import os, adstelo adstelo.init( bot_secret=os.environ["ADSTELO_BOT_SECRET"], api_key=os.environ["ADSTELO_API_KEY"], )
Does this slow down my bot? No. Events are dispatched asynchronously in the background and never block your handlers. The timeout for each request is 3 seconds and errors are silently swallowed.
What if I use a library that isn't listed? The SDK currently supports aiogram v3, python-telegram-bot v20+, pyTelegramBotAPI (sync & async), and Telethon. More libraries are on the roadmap. Open an issue or email support@adstelo.com.
What exactly is tracked?
The SDK reports: user ID, chat ID, event type (message, button, photo, video, sticker, inline_query), a timestamp, and whether it was a /start command. No message content is ever read or transmitted.
What is the difference between bot_secret and api_key?
bot_secret — identifies which bot generated the event. One per bot.api_key — authenticates your account. One per publisher account.Do I need to change anything else in my bot?
No. Call adstelo.init() once at startup before your Dispatcher/Application/Bot is created, and everything else stays exactly as-is.
When do I get paid? Earnings from ads displayed in your bot accumulate in your Adstelo dashboard. Withdrawals are processed on request. See adstelo.com for payout details.
Proprietary — © Adstelo. All rights reserved.
pypistats · 51 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-19 – 2026-10-19 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-18 – 2026-10-18 | 25 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-15 – 2026-10-15 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-13 – 2026-10-13 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-11 – 2026-10-11 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-10 – 2026-10-10 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-09 – 2026-10-09 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-02 – 2026-10-02 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-10-01 – 2026-10-01 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-30 – 2026-09-30 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-29 – 2026-09-29 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-28 – 2026-09-28 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-27 – 2026-09-27 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-26 – 2026-09-26 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-19 – 2026-09-19 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-18 – 2026-09-18 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-12 – 2026-09-12 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-10 – 2026-09-10 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-09 – 2026-09-09 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-07 – 2026-09-07 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-09-01 – 2026-09-01 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-31 – 2026-08-31 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-29 – 2026-08-29 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-28 – 2026-08-28 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-27 – 2026-08-27 | 1 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-24 – 2026-08-24 | 7 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-23 – 2026-08-23 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-21 – 2026-08-21 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-20 – 2026-08-20 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-18 – 2026-08-18 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-14 – 2026-08-14 | 6 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-13 – 2026-08-13 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-12 – 2026-08-12 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-10 – 2026-08-10 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-09 – 2026-08-09 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-08 – 2026-08-08 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-06 – 2026-08-06 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-05 – 2026-08-05 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-03 – 2026-08-03 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-02 – 2026-08-02 | 3 | 2026-10-20T21:25:09.3134068Z |
| 2026-08-01 – 2026-08-01 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-31 – 2026-07-31 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-30 – 2026-07-30 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-29 – 2026-07-29 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-28 – 2026-07-28 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-27 – 2026-07-27 | 2 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-24 – 2026-07-24 | 4 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-23 – 2026-07-23 | 5 | 2026-10-20T21:25:09.3134068Z |
| 2026-07-22 – 2026-07-22 | 2 | 2026-10-20T21:25:09.3134068Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.2 | 19 Mar 2026 | 2 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 19:54 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:24a75022e2b6f30001707c8e81ef0d7899e248726bbd59c7f846be3cf6597acf