Make telegram bot Webhook secret
See original GitHub issueRight now everyone can POST event to TelegramBotWebhookView and fake Telegram events. This is a security issue so it is better to change Webhook url to contain secret value like TELEGRAM_TOKEN.
Current Webhook POST endpoint:
/super_secter_webhook
Let’s change it to:
/telegram/webhook/<TELEGRAM_TOKEN>
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Telegram Webhooks Integration: 7 Easy Steps - Learn | Hevo
Steps to Set Up Telegram Webhooks Integration using Bot API · Step 1: Obtain the Authorization Token · Step 2: Set Up your...
Read more >Setting your Telegram Bot WebHook the easy way
Today we'll see by practical examples how to send a message to a Telegram channel. In order to be able to do so,...
Read more >setWebhook - Telegram Bot API - PHP SDK
If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g....
Read more >cURL command to set a Telegram chatbot's webhook
If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g....
Read more >setWebhook: Set a webhook in telegram.bot - Rdrr.io
If you'd like to make sure that the webhook request comes from Telegram, we recommend using a secret path in the URL, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

So the TELEGRAM_TOKEN can be more easily compromised, for example, in logs.
I disagree. If they have the token discovered from a 3rd party logging service or a poorly secured S3 bucket, they OWN your bot and can set the webhook URL to whatever they want it to be. I’m worried that Telegram might have poor log file control but I can’t control what they use as the endpoint. I don’t have to get your server to read your logs, I just need to get to where you store the log files…
The article you quote doesn’t even agree with your premise.