How to set up a postback using the Telegram bot
Postback is the transfer of information about the completion of an action from one platform to another (for example, a player registered using a link).
Postback makes the work with an advertising campaign easier as it collects all the data in one place. In our case, you will get a Telegram bot that will notify you about new registrations and deposits.
This process can be divided into two tasks:
- Setting up a Telegram bot.
- Postback setup.
Creating the bot
To set up the bot, you need to go open the Telegram and in the general search find the contact @botfather. Then click «start».
After that, @botfather will show you a list of commands. You need to create a bot to receive notifications about new players. Press the /newbot command to get started.
After that, @botfather will show you a list of commands. You need to create a bot to receive notifications about new players. Press the /newbot command to get started.
Now you need to set the name of the chatbot, for example, «New players». Next, set the login to end with _bot, for example, «Coolplayers_bot».
Your bot is ready! After creating a bot, you will receive a message with a bot token, which which needs to be saved for the postback configurations.
Now you need to find your bot in the general search using the login that was specified earlier. In our case, this is «Coolplayers_bot».
Select the created bot and send it any message. You will return to it a little later.
Next, start the browser and open the link:
api.Telegram.org/bot<bot_token>/getUpdates
Where <bot_token> is your bot’s token. Add your token to the link and open the result: api.Telegram.org/bot6308694140:AAEuEA10scbYJaYd2wWchkX2onI8FxLzPLI/getUpdates
If everything is correct, you will see the message:
Here you need to take the id (don’t confuse it with update id). The required id is indicated at the beginning of the third line. If you see an error or the page is not displayed, then you need to send any message to your bot again and refresh the page.
Checking the bot
Follow the link again https://api.Telegram.org/bot<bot_token>/sendMessage?chat_id=<id>&text=<text> , replacing in there:
- <bot_token> — with your bot's token (from BotFather)
- <id> — with your id taken from the link in the browser
- <text> — with any text (for example, «hello»)
If everything is fine, the bot will send you the message you specified in the «text» section.
Now we can proceed to setting up a postback in the Telegram bot using the affiliate program website.
Setting the postback
We recommend creating 3 bots at once, each one for a single action:
- Registration
- First deposit
- Repeated deposit
For the postback to work correctly, you must use special links suitable for the 1win affiliate program.
For registrations: https://api.Telegram.org/bot(A)/sendMessage?chat_id=(B)&text={user_id}:{country}
For first deposits: https://api.Telegram.org/bot(A)/sendMessage?chat_id=(B)&text={user_id}:{country}:{amount}
For deposits: https://api.Telegram.org/bot(A)/sendMessage?chat_id=(B)&text={user_id}:{country}:{amount}
Where instead of (A) you need to insert your token, and instead of (B) your ID.
Next, save the resulting links and connect them to your account as follows:
- Go to the affiliate program website
- Open the «PR-tools» section, then go to «Links»
- Select the needed referral link and click the paperclip icon.
In the pop-up window, paste the links as follows:
Ready! Now you have postback bots that will send you notifications every time they see activity on a link.
You will also see the player's ID, which will help speed up and make your work easier.