I have an image file that I obtained using GoogleFilePicker. Using the FileId from GoogleFilePicker, I'm trying to retrieve the file using the following URL: https://www.googleapis.com/drive/v3/files/${FileId}?alt=media&supportsAllDrives=true.
The scope for the accessToken is 'https://www.googleapis.com/auth/drive.file'. When I attempt to retrieve the file using the main account (in which the file exists), everything works fine. However, if I want to retrieve the file from another account (where the file is shared with that account), I encounter issue 404.
{
"error": {
"code": 404,
"message": "File not found: 1OQSUO7ObmEavKMXXkxNuG12vffqVi-Gk.",
"errors": [{
"message": "File not found: 1OQSUO7ObmEavKMXXkxNuG12vffqVi-Gk.",
"domain": "global",
"reason": "notFound",
"location": "fileId",
"locationType": "parameter"
}]
}
}
Is it possible to obtain a file without the scope 'https://www.googleapis.com/auth/drive', only with 'https://www.googleapis.com/auth/drive.file'?