MGRAM

Telegram bot monetization

A ready-made template that makes your Telegram bot earn money — in one Python file.

This repository plugs a Telegram bot into the MGRAM ad network. Before answering, the bot shows sponsor tasks (join a channel, start a bot) — that's a force-subscribe gate; after a useful answer it shows a short Reply Ad. You get 70% of every placement, from the very first user, with payouts in USDT. If MGRAM is unreachable or has no tasks, users simply go through — your bot never breaks.

GitHub · telegram-bot-monetizationConnect a bot in @mgrammgram.biz

Three lines in aiogram 3

from mgram_gate import MgramClient, MgramGate

gate = MgramGate(MgramClient(MGRAM_API_KEY))
gate.setup(dp)               # sponsor tasks before the answer
await gate.show_ad(message)  # an ad after the useful answer

How it works

StepThe user seesAPI call
1Writes to your bot—
2Sponsor buttons and “✅ Check”POST /tasks
3Taps “Check” — access opensPOST /tasks/check
4Your bot's answer—
5A short ad from your botPOST /reply-ads/show

Open-source repositories

Bot templatemgram-web/telegram-bot-monetization
Pythonpip install mgram-sdk · PyPI · mgram-web/mgram-sdk — Python SDK: API client, aiogram 3 and python-telegram-bot, webhooks
JavaScriptnpm i mgram-sdk · npm · mgram-web/mgram-js — grammY, Telegraf
Gogo get github.com/mgram-web/mgram-go · pkg.go.dev
MCPhttps://mcp.mgram.biz/mcp · Claude, ChatGPT, Cursor, Gemini CLI
APIapi.mgram.biz · OpenAPI · Node.js · Mini App

Templates in other languages

Русскийmgram-web/monetizaciya-telegram-bota
Españolmgram-web/monetizar-bot-telegram
Portuguêsmgram-web/ganhar-dinheiro-bot-telegram
Bahasa Indonesiamgram-web/monetisasi-bot-telegram
Türkçemgram-web/telegram-bot-para-kazanma