How to make user re-authorize after adding new scopes?

13 views
Skip to first unread message

Hoang Trinh

unread,
Oct 29, 2019, 4:37:32 AM10/29/19
to Google Apps Script Community
Hi everyone


There is an authorizationEmail.html file:

The add-on's automatic functions are temporarily disabled until you
re-authorize the add-on. You can accomplish this by opening one of the forms
using the add-on and running the add-on through the menu. Alternatively, you can
click this link to approve authorization directly

As I understand, when I added new scopes and published, the add-on will stop running for all users that did not authorize newly added scopes. And I have to use this code to send an email to those users (once per day) to notify them.

This works find if all those users read email regularly (and carefully).

But if they don't read the email or don't open the add-on or even read the email but don't click in the re-authorization link, the add-on will stop running forever, am I correct?

So is there any better way to make sure the add-on will run after adding new scopes?

Thank you.

Andrew Roberts

unread,
Oct 29, 2019, 6:54:42 AM10/29/19
to Google Apps Script Community
> the add-on will stop running forever, am I correct?

I've used this code in the past, and that would seem to be the case. Unless the user specifically authorises the new scopes they won't work. But Add-ons do run until they hit the code they aren't authed to use, so you can conditionally isolate the new functionality and everything else will still work.
Reply all
Reply to author
Forward
0 new messages