sestegra
sestegra

Reputation: 87

How to list shared folders from "My Drive"

On Google Drive web application, "My Drive" contains following folders

When I try to get files.list with query "parents in 'root' and mimeType = 'application/vnd.google-apps.folder'", I obtain only "C" folder.

How to get "A" and "C" folders in the query result ?

Upvotes: 1

Views: 1188

Answers (1)

Tanaike
Tanaike

Reputation: 201713

How about the following patterns for the query?

Pattern 1 :

or sharedWithMe was added. In my environment, the folders of A, B and C on root can be retrieved by this query.

parents in 'root' and mimeType = 'application/vnd.google-apps.folder' or sharedWithMe

Pattern 2 :

For "A (owner: me, shared: true)", I'm not sure whether this folder is at root. So can you try this query?

mimeType = 'application/vnd.google-apps.folder' or sharedWithMe

Reference :

If these were not useful for you, I'm sorry.

Upvotes: 2

Related Questions