Deleting webhook

Telegram bots & Apps Script

I got the following error while using the getUpdates method.

Error message that was received on calling getUpdates method

This was when I was trying to locate the ID of a Telegram group by running this getUpdates method from a browser.

The solution was to delete the webhook. Ran the following piece of code to have the webhook deleted and the getUpdates method worked fine after that.

//url = "" + token;function deleteWebhook() {
var response = UrlFetchApp.fetch(url + "/deleteWebhook?url=" + webAppUrl);

Log that confirmed that webhook was deleted