I have a google apps script (that I use in one of my spreadsheets). I'm used to calling the DriveApp service to handle files (list, create, move, etc), but I wanted to get the user that last modified a file. Looking it up in several places, I understood that the only way to achieve that is to import the Drive API SDK (the Advanced Drive Service) into the Google Apps script. I added it using the official documentation. So, here is where I'm stuck. To simplify, look at the code below:
console.log(DriveApp.getFileById('1eMIUTEmpvzN5a3kK6PWbK4W8RCkbNOSxxxxxxxxxxx').getName())
console.log(Drive.Files.get('1eMIUTEmpvzN5a3kK6PWbK4W8RCkbNOSxxxxxxxxxxx').title)
The first one shows my file name just fine. The second one fails with:
GoogleJsonResponseException: API call to drive.files.get failed with error: File not found: 1eMIUTEmpvzN5a3kK6PWbK4W8RCkbNOSxxxxxxxxxxx
(anonyme) @ List Files.gs:2
Any ideas why it wouldn't work?