My scenario is that I want to look for a file, that if it exists, was created by my app.
If I request drive scope, I can use
/drive/v2/files?q=trashed%3Dfalse+and+title+%3D+'MyFile'+and+'root'+in+parents
and all is good.
But this requires access to all the users existing drive files, which is too demanding. So I removed the drive scope and try the same command with only drive.file scope.
In return I get
{
"code" : 500,
"errors" : [ {
"domain" : "global",
"message" : "Internal Error",
"reason" : "internalError"
} ],
"message" : "Internal Error"
}
Hacking around, if I remove the 'root' in parents, I get
{
"kind": "drive#fileList",
"etag": "\"Q5ElJByAJoL0etObruYVPRipH1k/vyGp6PvFo4RvsFtPoIWeCReyIC8\"",
"selfLink": "https://www.googleapis.com/drive/v2/files?q=trashed%3Dfalse+and+title+%3D+'MyFile'",
"items": []
}
which is better than a 500, but still not what I expected.
So how can I check if MyFile exists without requiring drive scope?