I use setWebhook for my telegram-bot and now I need to use getUpdates. I have read the docs, and they say, that I can use only one method.
The problem is, that I have in console:
{"ok":false,"error_code":409,"description":"Error: Conflict: another webhook is active"}
So the question is, how to UNSET webhook and use getUpdates?
4
Answers
as mentioned in Telegram bot api documentations you just need to pass empty string to
url
parameter.In a browser send the following request:
you can just call the method
https://core.telegram.org/bots/api#deletewebhook
for example using telepot
I wrote a small rake task for this job
If you have the token stored in the credentials you can get them via:
token = Rails.application.credentials.telegram[:bot]