5

In my application, I am using 'drive.file' scope for Google Drive access from the user. I share few files in google drive amongst the users that are created by my application. Now, once a file is shared with a user, the file is not accessible to that user because of "drive.file" scope saying '404 file not found' error. But when I replace the scope with full Drive access, the file is accessible. So is their a way I can use the restrictive scope as well as retrieve/access the shared files amongst the users of my application?

2 Answers2

1

Opening a file shared to user may need auth/drive full authorization, as stated in the related SO post, Access to all files on a user's Google Drive , and Google Drive api scope and file access (drive vs drive.files) , "to be precise the Drive API gives access to Files created by the app and files that the user has opened with the app from the Drive UI (through open-with)." You can try using https://www.googleapis.com/auth/drive.readonly if you just need to view file metadata and file content. Hope this helps.

Community
  • 1
  • 1
Mr.Rebot
  • 6,703
  • 2
  • 16
  • 91
0

When I last asked about it, there was not. You can see some discussion here:

https://plus.google.com/u/0/+JoeGibbsPolitz/posts/7xLaiAMUP8q?cfem=1

The conclusion of that thread, which I find pretty weird, is that adding the drive.file scope can actually reduce the authority of a request to the GDrive API.

jpolitz
  • 629
  • 1
  • 8
  • 8