Article
home/blog/Loading

How to request different scopes on a 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
  ]
}