Access private document from google drive using google drive api

Viewed 106

I am new to Google Drive API. I read on the google quickstart guide that we can access list of documents from our drive but can we do the same with the documents shared privately to us. Like if someone gave me view access of the document from their drive, Can I download it with Google drive API? I am trying to do this in a spring-boot application.

1 Answers

Yes, you can use Files.list() to list the files shared with you. To do so you should use the q parameter to filter those files. For example, you may use 'SaumyaShah@gmail.com' in readers if you want to list the files that have been shared with you. Here you can learn more about the q parameter. For further information about how to download those files, please follow this guide. Feel free to leave a comment if you still have doubts about these approaches.

Related