Karthick Sundar
Karthick Sundar

Reputation: 57

How do I avoid apps script authorisation process?

I have a container bound script to a spreadsheet, which I consider the template sheet. I have an option to make a copy of this sheet. If I run any function on the newly created sheet (copy of template), it asks for google authorisation.

Users will be making copy very often, so we don't need this authorisation to be prompted. How do I avoid this authorisation without publishing the script as sheets add-on?

Please help me understand how to avoid this authorisation.

Upvotes: 1

Views: 1783

Answers (1)

roma
roma

Reputation: 1580

You can't avoid authorization, cause that would be a security hole. However, there are at least 2 ways to reduce tension:

1) Users won't be asked for authorization, if you only use simple triggers (like onEdit, onOpen) w/o accessing sensitive scopes.

2) You can add

/**
* @OnlyCurrentDoc
*/

if script activity is scope to container sheet. This won't remove auth dialog, but will remove "App is unverified" dialog step which might be frightening to new users.

Upvotes: 3

Related Questions