0
votes

I have an XLSX file on Google Drive. A link can be found here:

https://docs.google.com/spreadsheet/ccc?key=0AoJYUIVnE85odEdsdEtVQVBuU254aTBtekw3LVVOc0E&usp=drive_web#gid=0

I know how to get a download link through the Google Drive SDK, but the link only works if the user is logged into a google account. See link below:

https://docs.google.com/feeds/download/spreadsheets/Export?key=0AoJYUIVnE85odEdsdEtVQVBuU254aTBtekw3LVVOc0E&exportFormat=xlsx

I have setup viewing options so that it is public. However, how can I get a public download link for the file? The only way I have found to do this is to download the file and copy the download link. The download link can be seen below:

https://docs.google.com/spreadsheet/fm?id=tGltKUAPnSnxi0mzL7-UNsA.PREF_12709722546300286642.234580469124820854&fmcmd=420

There does not seem to be a correlation between the ID provided in the URL of the document and the ID of the download link of the document. Is there no other way to get a public download link?

1

1 Answers

2
votes

You can GET https://googledrive.com/host/<FILE_ID> to download public files with no auth. This is not going to work for files with no downloadLink (such as Docs and spreadsheets files).