I’m trying to use the Google Drive API in Javascript to get a list of files that the signed in user can edit. How do I do this?
I’ve tried using a files/list request to get the list of files which gets a list of all files by default:
https://developers.google.com/drive/v2/reference/files/list
The request also accepts search parameters:
https://developers.google.com/drive/search-parameters
e.g. to search for files writeable by the user “test@example.org” use ‘test@example.org’ in writers
I need to be able to say ‘ [current user’s email address] in writers’ or something similar for this to work though and I can’t see any way to programmatically get the current user’s email address.
Should be able to do that with a query like:
That’ll return files the current user either owns or it where it was shared with them with edit permissions.