I've done a bot for telegram and it worked but some days ago it appears a problem.
"can't use getUpdates method while webhook is active; use deleteWebhook to delete the webhook first"
I use the deleteWebhook but it doesn't work (with the python-telegram-bot).
I use the Python 3.6.12 version
data = {"url": ""}
bot = telegram.Bot('XXXXXX ')
if (normalize(update.message.text).upper() == 'HOLA'):
chat_id = update.message.chat_id
bot.sendMessage(chat_id, 'HOLA')
#pload = {'chat_id':chat_id,'message_id':'123'}
#r = requests.get('https://api.telegram.org/botXXXXXX/deleteWebhook')
#r = requests.post('https://api.telegram.org/botXXXXXX/deleteWebhook',data = pload)
r = requests.post('https://api.telegram.org/botXXXXXX/setWebhook',data = data)
respuesta = bot.deleteWebhook()
bot.sendMessage(chat_id, respuesta)
respuesta = bot.deleteWebhook()
Could you tell me if there is a problem with that? How I can fix it?
Thank you