2

I wrote a telegrambot using Google Apps Script.

And I coded like this:

function setWebhook() {
  const resp = UrlFetchApp.fetch(botUrl + "/setWebhook?url=" + hookUrl);
  Logger.log("SetWebhook response:", resp.getResponseCode());
}

function getWebhook() {
  const resp = UrlFetchApp.fetch(botUrl + "/getWebhookInfo");
  if (resp.getResponseCode() == 200) {
    const data = JSON.parse(resp.getContentText());
    Logger.log("Current webhook is", data.result);
  } else {
    Logger.log("GetWebhook response:", resp.getResponseCode());
  }
}

After I select the function getWebhook and click RUN, a pop-up window says "this app isn't verified".

screenshot

Then I click Advanced and click Go to TGBot (Unsafe), but the verification is still unsuccessful, and a toast says "Something went wrong, try again".

What I have tried:

  • switch my browser from Chrome to Edge
  • Use different Google accounts, and start a new project
  • Erase my browser data

But nothing is working.

  • You may try to create a issue in the issuetracker. See [tag info page](https://stackoverflow.com/tags/google-apps-script/info) for official documentation, free resources and more details. – TheMaster Jul 01 '22 at 10:56

1 Answers1

1

According to this issue post and documentation: Fix issues with multiple Google Accounts

Fix issues with multiple Google Accounts

If you're logged into multiple Google Accounts at the same time, you might have trouble accessing your Apps Script projects, add-ons, and web apps. Multi-login, or being logged into multiple Google Accounts at once, isn't supported for Apps Script, add-ons, or web apps.

To fix issues from multi-login, try one of the following solutions:

  • Log out of all your Google Accounts and only log in to the one that has the Apps Script project, add-on, or web app you need to access.
  • Open an incognito window in Google Chrome, or an equivalent private browsing window, and log in to the Google Account that has the Apps Script project, add-on, or web app you need to access.

In my case which was similar it helped.