Google SDK "sharedWithMe = false" search query not working

I am trying to get a list of folders in "My Drive" and request " https://www.googleapis.com/drive/v2/files " with this search query:

mimeType = 'application/vnd.google-apps.folder' and trashed = false and 'me' in writers and sharedWithMe = false

But this gives this error:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "invalid",
    "message": "Invalid Value",
    "locationType": "parameter",
    "location": "q"
   }
  ],
  "code": 400,
  "message": "Invalid Value"
 }
}

But when I use sharedWithMe = true, it works great.

Here https://developers.google.com/drive/web/search-parameters does not mention anything about sharedWithMe authentication. So is this intentional behavior?

Is there a better way to get a list of My Drive directories instead of this query?

+4
source share

Source: https://habr.com/ru/post/1546717/


All Articles