Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Drive api scope and file access (drive vs drive.files)

Tags:

I have created two refresh tokens for me: one for

SCOPE = 'https://www.googleapis.com/auth/drive' 

and another

SCOPE = 'https://www.googleapis.com/auth/drive.file' 

I'm trying to get information about files (using get method) Some files I can get when using SCOPE drive.files, and some only when using wider scope drive

But I can not figure out what is the reason for that? Files are located in different folders but have one shared root folder.

like image 924
WHITECOLOR Avatar asked Mar 14 '14 10:03

WHITECOLOR


People also ask

What is the difference between Google files and drive?

The Google Docs folder on your desktop can easily be replaced with the new Google Drive folder and is used in exactly the same way to shared files to your online drive. Google Drive has multiple ways to find, sort and view your files unlike the previous Google Documents List which was admittedly limited.

What is the difference between a file and a folder in Google Drive?

A file that contains text or binary content such as images, videos, and PDFs. A container you can use to organize other types of files on Drive. Folders are files that only contain metadata, and have the MIME type application/vnd. google-apps.


1 Answers

The difference is that 'drive.file' only gives you permission to files that your app has created or the user has explicitly shared with your app, whereas 'drive' gives your app permission to see the all the files in the user's drive.

See

https://developers.google.com/drive/web/scopes

like image 88
jpolitz Avatar answered Sep 21 '22 08:09

jpolitz