I received this error when attempting to run the sample Drive AppScript, even after authorizing the AppScript to access Drive. I have also tried hard-coding a folder ID and am receiving the same error.
The code is as follows:
function listFilesInFolder(id) {
var folder = DriveApp.getFolderById(id);
var contents = folder.getFiles();
var file;
var name;
while(contents.hasNext()) {
file = contents.next();
name = file.getName();
Logger.log(name);
}
};
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…