Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read content of public shared file in Google Drive

I am working on a Google Drive application.

The application needs to read the contents of a publically shared file in someone's Google Drive.

How can I do this?

Is there an API to achieve this?

like image 744
Fizer Khan Avatar asked Jul 26 '12 07:07

Fizer Khan


People also ask

Can others see my Google Drive content?

Your files are private unless you choose to share them. You can share files with: One person or a few people using a link. Everyone by making the files public.


1 Answers

When using the Google Drive API, after setting the ACL of the file to be public you can directly access the file using the webContentLink attribute of the file metadata which should not require any authentication/authorization when the file is public.

This is a feil metadata example: https://developers.google.com/drive/v2/reference/files#resource

This is how to get the file metadata using common client libraries: https://developers.google.com/drive/v2/reference/files/get

like image 104
Nicolas Garnier Avatar answered Nov 15 '22 11:11

Nicolas Garnier