Why BotPresto is Safe to Use

What happens after you provide the token

After you provide your bot token — and, optionally, the secret token, if your endpoint requires one — the following will happen:

  1. BotPresto will query the Telegram bot API to retrieve the webhook URL used by your bot and will store it encrypted in the database along with the bot token (see the next section below).
  2. BotPresto will call the Telegram API to change your bot’s webhook URL to BotPresto’s URL instead of your own. The new webhook URL will look like this: https://botpresto.com/proxy/bot/6bf52dbb-3ace-46ab-9096-0a195777c9a5.

After these steps, BotPresto will handle your bot calls by serving as a transparent proxy, forwarding the calls unchanged to the webhook URL we saved in step 1. Simultaneously, BotPresto will extract analytics data from the requests and send it to Mixpanel.

BotPresto will also use your bot token for sending your user meaningful messages when your endpoint returns an error or isn’t reachable. This improves the default Telegram behavior of maintaining silence, which is often very confusing to the end user.

What makes sharing the token safe

All sensitive bot data, such as Telegram access tokens, your endpoint secret key, and Mixpanel auth tokens, are stored encrypted using AES-GCM in our Postgres DB. The encryption keys are configured in GitHub Secrets and are retained solely in the memory of the running BEAM. This setup makes it highly unlikely that hackers will access these keys.

We guarantee that we will never send any messages to your customers on behalf of your bot, except to provide features that are explicitly described in this documentation.

It’s also important to note that possessing the Telegram token does not allow anyone to take over ownership of your bot. The token can be revoked by the bot owner at any time via the bot’s settings.

What data gets collected

We only store end user data already accessible to your bots, such as telegram ID, first/last name and the language code. This data will be used when the marketing features of BotPresto are publicly available: for example, you’ll be able to (automatically) send out marketing messages to select users of your bot in the language that they prefer.

We never store anything that users post to your bot or in the channels and groups that your bot participates. At the moment such a message arrives to BotPresto, we simply forward it to your webhook endpoint, and then it’s instantly “forgotten” (garbage-collected from the memory).

What makes BotPresto reliable

Our infrastructure is designed in the way that we have zero-downtime during deployments. It has 4 host:

In the rare occasion when the load balancer on the DB host need to be rebooted for a system update, BotPresto will automatically temporarily switch all of your bots to their original state, effectively removing BotPresto as the proxy. After the upgrade is done, BotPresto will re-connect your bots and resume its normal functions. BotPresto will warn you about such updates in advance.

Manual configuration option

If you’re still not comfortable with providing BotPresto your bot token, there’s a way to configure it manually if you only want analytics and alerting (other features such as error recovery won’t work).

For manual configuration, please, get in touch with me.

Deleting the Bot

You can fully revert your bot configuration to its original state at any time by deleting the bot. BotPresto will use the securely stored data to direct Telegram traffic back to your webhook endpoint before completely removing the bot from our system.