VideosMy ProjectsProgramming BlogGallery
  1. Home
  2. Blog
  3. How to request different scopes on a Google Apps Script
Programming Blog

Atom/RSS Feed

google/google_apps_script

How to request different scopes on a Google Apps Script

google/google_apps_script

To request scopes in a Google Apps Script you need to add them to the appscript.json file.

You need to place them under the key oauthScopes

How to include them

You need to find the url for the scope you wish to use. You can find all the scopes on this page

Google Drive has the scope https://www.googleapis.com/auth/drive so I would include this in the oauthScopes key of the appscript.json

Example appscript.json

{
 "timeZone": "<timezone>", // default "America/New_York"
 "dependencies": {
   "libraries": []
 },
 "exceptionLogging": "STACKDRIVER",
 "oauthScopes": [
   // PLACE YOUR SCOPES HERE IN URL FORMAT
   "https://www.googleapis.com/auth/drive" // for example
 ]
}
Join my mailing list