The code is supposed to copy some data from another spreadsheet and then I manipulate it.
This code worked yesterday, then I tried adding a library today and now it is still throwing this error even after removing the library and rolling back my code to the version yesterday.
Error Message:
You do not have permission to call SpreadsheetApp.openById. Required permissions: https://www.googleapis.com/auth/spreadsheets (line 21, file "Import")
Code:
data = SpreadsheetApp.openById('1-SyJRflR1YYYYDRo3e7xnDhYYYY6hIGDBKODl9XXXXX').getSheetByName("g1.1").getDataRange().getValues();
I am NOT using "//@OnlyCurrentDoc" anywhere in either of my documents so that is not my problem.
Google sheets API is turned on for this project, as checked from the resources menu.
The library function I was attempting to use was a simple time one (nothing to do with sheets), and it is not currently being called anywhere in my project and the library has been detached.