1

I have a Google Form that acts as a Parent/Template with Google Apps Scripts tied along with it. Whenever I make a copy of the Google Form, the Google Apps Scripts are copied along with it but the scopes have to be reviewed each time. Is there a way to manually add scopes so I don't have to review permissions every time?

Cœur
  • 37,241
  • 25
  • 195
  • 267
CHEWWWWWWWWWW
  • 169
  • 3
  • 20
  • You can publish your Apps Script as add-on, then you will be able to give permission for it just once, see https://developers.google.com/apps-script/add-ons/ – Kos Jan 11 '19 at 21:29
  • Each copy is a new script project. Google doesn't let **anyone** run an arbitrary, unapproved script. Thus, you must authorize each copy. – tehhowch Jan 11 '19 at 21:32
  • 3
    Possible duplicate of [Deny granting permissions in my own google scripts everytime](https://stackoverflow.com/questions/50811046/deny-granting-permissions-in-my-own-google-scripts-everytime) – tehhowch Jan 11 '19 at 21:34

1 Answers1

0

You can use the Google Apps Script REST API's projects.updateContent method to update the existing manifest file with the required scopes.

Note that -

One of the files is a script manifest; it must be named "appsscript", must have type of JSON, and include the manifest configurations for the project.

Hope this helps.

Sourabh Choraria
  • 2,255
  • 25
  • 64