API, TOKEN, and PRODUCT_ID.
1. Create an offer
Create a free offer for the product, or use an existing one:data.id as OFFER_ID.
2. Find the subscriber
A subscriber is anyone who has started the bot. Find the subscriber ID: List subscribers returnsuser_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
Check progress
status: "active"andsteps_completedgrowing as the subscriber goes — the course works.status: "finished"withsteps_completed=steps_totalright 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.