Skip to content
MGRAMGuides

Telegram bot monetization API: paid tasks in your own interface

October 23, 20262 min readMGRAM team

If your bot has its own flow and a standard subscription screen doesn't fit, embed tasks via API — at the moment and in the design you choose. Here is how the MGRAM Tasks API works.

In short. POST /tasks returns tasks with their reward, POST /tasks/check or a webhook tells you a task is done. The owner gets 70% of the task price: from 0.77 ₽ per subscription, from 0.70 ₽ per launch.

What you need

  • A bot connected to MGRAM.
  • A Bot API key — «My bots» → your bot → «Settings» → «API key».
  • A bot server that can make HTTPS requests with JSON.

Flow

  1. Get tasks: POST https://api.mgram.biz/tasks with Authorization: Bearer BOT_API_KEY and body {"user_id": 123456789}. The response has tasks with title, link, button_text and reward. 3 tasks by default, 1 to 10 on request.
  2. Show them as buttons — the link and the button text are already in the response.
  3. Check with POST /tasks/check, or receive a webhook.
  4. Let the user through when the response has skip: true.

Webhook

POST /tasks/webhook with your url turns on events for completions and unsubscribes. Each event is signed: X-MGRAM-Signature is HMAC-SHA256 of timestamp.body.

Where to place tasks

  • Instead of payment for a premium feature.
  • For a bonus: extra attempts, coins, limits.
  • On a rewards screen in your Mini App.

Full reference: api.mgram.biz.

FAQ

Is there an API to monetize a Telegram bot?

Yes, the MGRAM Tasks API: your bot shows subscribe and launch tasks in its own interface and earns 70% per completion.

How do I know a task is completed?

Call POST /tasks/check or use the HMAC-signed webhook.

How many tasks can I request?

1 to 10, 3 by default.