I'm following the Quickstart on https://developers.google.com/drive/api/v3/quickstart/python. I've enabled the drive API through the page, loaded the credentials.json and can successfully list files in my google drive. However when I wanted to download a file, I got the message
`The user has not granted the app ####### read access to the file`
Do I need to do more than putting that scope in my code or do I need to activate something else?
SCOPES = 'https://www.googleapis.com/auth/drive.file'
client.flow_from_clientsecrets('credentials.json', SCOPES)
if credentials.invalid: ...where something likeflow.run_local_server()is used to display a prompt to the user and then request the access (and perhaps also refresh) token, depending on your application type. - tehhowchdrive.filescope means there are special rules about file access. Namely, the user must "pick" your app to open a file with (or create the file with the app) in order for your app to gain permissions to use that file. - tehhowchdrive.fileshould grant downloads. - user1767754drive.fileshould grant downloads" is, in general, false. As I mentioned above, there are special rules regarding file access withdrive.filescope. You mention following the quickstart, which usesdrive.metadata.readonlyto allowlisting all the files. You still need to get explicit user permission to obtain content, because you are using thedrive.filescope and a file that was not created with your app. Hence, you must ask the user to use your app to open the file. Review the Drive File Picker code. - tehhowch