September 13, 2024

Setting up notifications from AdsBridge to Telegram Bot

Hi everyone!
Today we’re going to cover the topic of transferring conversions from the tracker to the Telegram side of things

To get started, we’ll need the Telegram app:

1. Type in the user @botfather in the search;
2. Add it.

 

3. After pressing /start all the available commands should come up, which you can click on, you need to create a new bot. Next, enter the bot’s name. Then its username (e.g. adsbridge_bot).

Please note: Username must end with Bot or _bot. You can find the name of the bot here (@adsbridge_bot).

4.Next, you will receive a message about creating a bot with a token, which we will need to customize in the future

 

Setting up the bot in Telegram

First, we need to mark our ID in Telegram to know where to send messages.

To do this, you can create a group or channel and add the bot as an administrator.

  1. We write any message to the group/channel;

Go to the link: https://api.telegram.org/bot/getUpdates

Instead of you need to insert the token of your bot. The link is like this:

https://api.telegram.org/bot7366643802:AAGfU03bCmdWDMKrfIZ1gdrTq-_bce9gbfs/getUpdates

When you click on it, you need to find the word “chat”; in it, you need to find the id. This is our id, where to send leads. It should be copied.

In this case, is the id of the chat 1837745499, your id will be different.

For the test, let’s try to send a message to ourselves. Go to the link: https://api.telegram.org/bot/sendMessage?chat_id=&text= , where
– bot token
– chat (group/channel) id
– the text you will send

If the message arrives, you have done everything correctly.

Customizing postback in AdsBridge

The postback template looks as follows:
https://api.telegram.org/bot/sendMessage?chat_id=&text=~~~***New message***~~~%0A%0AGLOBAL%20POSTBACK%0AUSER%20ФAFFID%0Aholder_id%20%0ACampaign_id%20%0Aoffer_id%20%0A%0AIP%20%0AOS%20%0ATrafficsource_name%20%0ACountry%20%0AState%20%0AUser_agent%20%0ATimestamp%20%0AToken1%20%0AToken2%20%0AToken3%20%0AToken4%20%0AToken5%20%0AToken6%20%0A

Note! Not all macros that are prescribed in the example can be used in the postback, you can leave only the ones you need for you

Example:
https://api.telegram.org/bot7366643802:AAGfU03bCmdWDMKrfIZ1gdrTq-_bce9gbfs/sendMessage?chat_id=1837745499&text=~~~***New message***~~~%0A%0AGLOBAL%20POSTBACK%0AUSER%20ФAFFID%0Aholder_id%20%0ACampaign_id%20%0Aoffer_id%20%0A%0AIP%20%0AOS%20%0ATrafficsource_name%20%0ACountry%20%0AState%20%0AUser_agent%20%0ATimestamp%20%0AToken1%20%0AToken2%20%0AToken3%20%0AToken4%20%0AToken5%20%0AToken6%20%0A

Next, you need to insert the link into the postback field in the AdsBridge campaign setup:

Next, do a test conversion on the affiliate or wait for the real one, after the conversion appears in the tracker, there will come a notification in Telegram in the following form:

Done, postback created!

Leave a commentYour email address won’t be published. All field marked with an * are required.