Contention
Contention

Reputation: 691

Does Google Drive's 'per file' scope cascade into child folders/files?

I'm about to start building a small app on top of the Google Drive API.

I'm a little bit nervous about giving the app full permissive scope to access a user's Drive and would prefer to give it a 'per file' access scope.

The basic idea is that the app would initially create a folder (let's call it the App Folder) in a user's Drive. I then want my app to also have access to the files and subfolders inside that particular App Folder, regardless of how they were created/uploaded to Drive (but without having access to the rest of the user's Drive).

So, my question (before I build this thing out) is this: does the 'per file' scope also allow the app to access (read/manage/move) any child files/subfolders inside the App Folder that were not created by the app.

In other words, does the 'per file' scope cascade down from the App Folder into child folders and files?

Or, is the 'per file' scope solely for files that were created by the app itself?

Basically, what I'm after is a Google Drive equivalent of Dropbox's 'App folder' as described here --> https://www.dropbox.com/developers/core/gs

Anyone know - I've struggled to find an answer to this so far.

Thanks

Upvotes: 5

Views: 1404

Answers (2)

TheMaster
TheMaster

Reputation: 50462

There is app folders in Google drive. However, the data here will be accessible only by the application(not by the user). And the data will be deleted as soon as application's access is revoked/ uninstalled. See

https://developers.google.com/drive/api/guides/appdata

Upvotes: 1

Ali Afshar
Ali Afshar

Reputation: 41643

Per-file scope is for files that were created or explicitly opened by the user with that application. This permission does not cascade, but of course if your application creates the folder, it can create files within there, and will not have access to read other files.

This is not the same as the Dropbox application folder, it is a tighter permission. Google are working on other features in this vein, so please stay tuned

Upvotes: 3

Related Questions