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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With