First, I have deleted my webhook:
curl "https://api.telegram.org/bot6359000876:XXX/deleteWebhook"
Then, I have set my webhook:
curl "https://api.telegram.org/bot6359000876:XXX/setWebhook?url=https://XXX.execute-api.us-east-1.amazonaws.com/development/webhook&secret_token=abc"
When I check for the X-Telegram-Bot-Api-Secret-Token in incoming request from Telegram, the header is not present.
What I am doing wrong?
2
Answers
It seems that Telegram does not update the "setWebhook"; I had to delete the webhook and add it again to work.
Make sure
x-telegram-bot-api-secret-token
is in lowercase.This is how it works for me with telegraf.js: