2

Is there a way to get files marked for public viewing in Google Drive using the API without authentication?

I know about the "downloadUrl" property, but it is a temporary URL with no reference to how long it lasts. I would like to use the API directly to get the files, and I think I read somewhere someone alluding to the possibility of calls to the API that are not authenticated for retrieving public files.

user1501783
  • 533
  • 2
  • 9
  • 20
  • This has been asked before. Try this post: http://stackoverflow.com/questions/18116152/how-do-i-get-a-file-list-for-a-google-drive-public-hosted-folder/38298877#38298877 – iDevGeek Aug 04 '16 at 03:47

1 Answers1

1

Edit: The webContentLink field of a File resource now provides this.

This is a known issue, and a big deal which we are working to fix. Currently, some sort of authentication is required, even for public files, which I think is not ideal. Sorry about that.

Ali Afshar
  • 40,967
  • 12
  • 95
  • 109
  • Any progress on this Ali? webContentLink does give me an URL, but only works if I am signed in, even if the file is shared to "Public" – user1501783 Jul 26 '12 at 21:09
  • That should not be the case, public files should not require cookie auth. Can you confirm this please. – Ali Afshar Jul 30 '12 at 20:21
  • You mentioned yourself that this was a known issue that was being worked on. Here is a the 'webContentLink' to a file with sharing set to "public." https://docs.google.com/uc?id=0B6Cpn8NXwgGPcmJZYThTUGg5RGM&export=download | it always requires me to log in to see it. – user1501783 Jul 31 '12 at 00:02
  • I see your edit that this is now webContentLink instead of downloadUrl, which I had discovered to be added recently. however, it still requires login for public files as shown in the above comment. Thanks! this is the last feature I need to complete my app! thanks Google for Drive. I've been waiting some time for a product like this. – user1501783 Jul 31 '12 at 00:08
  • Is webContentLink a temporary URL like downloadUrl? – user1501783 Jul 31 '12 at 01:42
  • @AliAfshar .... if we are not able to get public url..then how Google Drive App for iOS is streaming video ..plz u must reply... – ChenSmile Sep 23 '13 at 19:29
  • @AliAfshar.. Did you find solution for this ? I want to get all files from public url of a directory ? Is it possible ? – Sourabh Bhutani Aug 09 '19 at 12:37