Skip to main content
Access to a product is always granted through an offer. There is no endpoint that adds a subscriber to a product directly. The product must be active — see Activate product. The examples use the same variables as Build a course in a bot: API, TOKEN, and PRODUCT_ID.

1. Create an offer

Create a free offer for the product, or use an existing one:
Save data.id as OFFER_ID.

2. Find the subscriber

A subscriber is anyone who has started the bot. Find the subscriber ID: List subscribers returns user_id (the Telegram user ID) and username for each subscriber; match on one of them and save its id as SUBSCRIBER_ID. There’s no search parameter, so page through the list (per_page, links.next).

3. Grant the offer

The subscriber is added to the product. In a bot product, they receive the first step right away. Subscribers can also get access by buying or activating the offer themselves — via the offer link from Get offer link.

Check progress

  • status: "active" and steps_completed growing as the subscriber goes — the course works.
  • status: "finished" with steps_completed = steps_total right after enrolling in a bot course — the course didn’t wait for the subscriber. See Set when each step is sent.

Restart

To start over for a subscriber, remove them from the product and grant the offer again. Pass "delete_steps": true to also delete the messages the bot already sent, otherwise they stay in the chat.