Reputation: 21
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".
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:
But nothing is working.
Upvotes: 2
Views: 230
Reputation: 11
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.
Upvotes: 1