0
votes

I have an application registered with google that asks users for permission to read and write all files in their google drive account.

I would find this alarming as an end-user, and my application does not in fact need the ability to read and write all files in the end-user's google drive account.

In fact I would only need the ability to read and write a single file, a file that my application creates.

Is something like this possible?

For example the scope here

 https://www.googleapis.com/auth/drive

permits all access to all drive files.

I am not finding a way to limit the scope at the file, or even to a folder, which would be nice: https://developers.google.com/identity/protocols/googlescopes

1
For example, how about using Service Account? 1. Create a Service Account. 2. Put a file you want to use to the drive of Service Account. 2. Use the file using Service Account. By this, only one file is accessed, even if https://www.googleapis.com/auth/drive is used. I think that there are several solutions. So please think of this as just one of them. I posted this as a comment, because I'm not sure whether this is the result you want. - Tanaike

1 Answers

1
votes

drive.file scope limits access to files that your app created. That sounds a good match for what you are asking for.