My script is nowhere using the SpreadsheetApp yet the scope 'https://www.googleapis.com/auth/spreadsheets' is listed when I go to File > Project Properties > Scopes. Can't understand why is it so. Any help is appreciated.
Asked
Active
Viewed 103 times
0
-
1Is it a bound script? – TheMaster Jul 04 '19 at 07:56
-
No, it's a standalone script published as WebApp. – Zuwaib Ansari Jul 04 '19 at 08:32
2 Answers
0
Scopes can be modified in the Manifest file. You can access it from View -> Show Manifest File. You can read more about it here.
Also, you might check if you have the correct Advanced Services enabled, in Resources -> Advanced Google Services.

Jescanellas
- 2,555
- 2
- 9
- 20
-
1SpreadsheetApp is used neither inside the manifest file nor it is enabled in advance services. But I've enabled the Drive advance service. Is it the reason? – Zuwaib Ansari Jul 04 '19 at 07:29
-
1See if the script has access to Sheets [here](https://myaccount.google.com/permissions). Those Project Properties get updated every time you save the script, so make sure there isn't any code related to Sheets. Anyway, as long as you revoke the Sheets permissions for this script, I wouldn't worry about it. – Jescanellas Jul 04 '19 at 08:08
-
Yes, when I checked the permissions through above link, it displays that the App See, edit, create, and delete your spreadsheets in Google Drive. – Zuwaib Ansari Jul 04 '19 at 08:37
-
Can you share your code? Maybe there is some line commented which contains Sheet related commands. – Jescanellas Jul 04 '19 at 10:11
-
I've found the word 'spreadsheet' inside my project but couldn't find. It contains more than 30 files which are a bit difficult to share. – Zuwaib Ansari Jul 04 '19 at 11:36
-
You can remove authorized permissions with code using `ScriptApp.invalidateAuth();` or you can go into your account and review apps with access to your account, and remove access there. There is probably some text in a comment that is causing Apps Script to require that scope. So remove any text that is the same or similar name as a class or method. – Alan Wells Jul 04 '19 at 22:03
0
The required scopes could be set automatically or manually. If your project is setting the scopes automatically this feature will take any instance of SpreadsheetApp
to set the basic Google spreadsheet scope even if SpreadsheetApp
is included in a comment, a library used by your project, or by the Google Sheets Adavanced Service if it's enabled.
Related

Rubén
- 34,714
- 9
- 70
- 166