AuthorizationInfo authInfo.getAuthorizationUrl() doesn't work?

43 views
Skip to first unread message

Hoang Trinh

unread,
Nov 1, 2019, 5:34:28 AM11/1/19
to Google Apps Script Community
Hi everyone,

Recently, I add a new scope to my add-on, which is now published.

I did some tests and it requires the user to accept new scope to continue using the add-on.

I did implemented this functionality to send mail that contains the Authorization Url to users: https://developers.google.com/apps-script/reference/script/authorization-info.html#getAuthorizationUrl() (in case they don't open the add-on to accept new scopes)

The authorization url looks like this:

https://script.google.com/macros/d/<scriptId here>/authorize

But the problem is, when I click the url, it opens a new tab and disappear immediately, which doesn't allow user to accept new scopes.

What is wrong here?

Thank you.

J Matthew Gaskill

unread,
Sep 10, 2023, 5:23:19 PM9/10/23
to Google Apps Script Community
The page at the URL will close automatically if it is accessed and the script does not require any authorization. (https://developers.google.com/apps-script/reference/script/authorization-info#getauthorizationurl)

~Matt

Reply all
Reply to author
Forward
0 new messages