telegram-bot-api
telegram-bot-api copied to clipboard
WebHooks not working ðŸ˜
When I use
webhook, err := tgbotapi.NewWebhook(host + ":" + port + "/" + bot.Token)
updates := bot.ListenForWebhook("/" + bot.Token)
(took it from docs) it doesn't work at all, (tested locally with ngrok
and localtunnel
, ngrok doesn't even get anything) ,
but when I use this (currently on heroku
):
webhook, err := tgbotapi.NewWebhook(host + bot.Token)
updates := bot.ListenForWebhook("/" + bot.Token)
it works just fine.
Is it a bug, or did I miss something in the docs?
Hey @hardskulls !
If you use ngrok, for example it gives you https://ee84-20-20-20.eu.ngrok.io
,
just use
webhook, err := tgbotapi.NewWebhook("https://ee84-20-20-20.eu.ngrok.io/" + bot.Token)