Hi everyone
I guess this is OLD news, but it wasn't for me until this morning, so I am sharing the details here, just in case it's useful for somebody else
(I still don't understand why it took me so long to learn about this ... I hope it's for real...)
Even, when using the Advanced Google Services Drive, it'd default to that full scope as well
Today, I just forced the limited Drive scope (drive.file) in the manifest, as follow
And now I am using functions like
- Drive.Files.insert() for files and folders everywhere
- Drive.Files.update() and Drive.Files.remove() only for files created by the same script, otherwise it'd throw "File not found" error
- Drive.Files.list() would only return the folders created by the same script
Still exploring and testing, but the good news is that the end user would get a lot more friendly and limited/restricted scope authorization message ... as follow:
+ View and manage Google Drive files and folders that you have opened or created with this app
- View files from Google Drive that you have opened with this app or that are shared publicly
- Save changes to files that you have opened with this app
- Create new files in Google Drive using this app
- View folders and their contents from Google Drive that you have opened with this app
- Make changes to folders and their contents that you have opened with this app
- Delete contents of folders that you have opened with this app
By the way, if/when downgrading from full drive scope to drive.file scope, all previous users will have to reauthorize the script again
Thanks
p.s. the scary full access scope authorization message is instead as follow
+ See, edit, create, and delete all of your Google Drive files
This app wants permission to access everything in your Google Drive. It will be able to do the same things you can do, including:
- See your files
- Upload and download your files
- Delete your files
- See the names and emails of people you share files with
- Share and stop sharing your files with others
- Remove people from your files
- Organize your Drive
There may be private information in your Google Drive, like financial records, medical reports, photos or tax info.