Retrieving a download link for a public Google Docs file

Reading the Google Docs API I find this:

Loading

Files cannot be downloaded in a format other than the one in which they were originally downloaded. Download URLs for files look something like this:

https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm12345/YzI2Y2ExYWVm?h=16655626&e=download&gd=true 

Given the public URL of the Google Docs file, let's say

 https://docs.google.com/open?id=0B1-vl-dPgKm_NTNhZjZkMWMtZjQxOS00MGE1LTg2MjItNGVjYzdmZjYxNmQ5 

How can I turn it into a download link?

+6
source share
2 answers

Hi nightcracker try this:

 https://docs.google.com/uc?export=download&id=DOCIDGOESHERE 

I just tried this with one PDF and it worked fine, so maybe the game will help with this ....

All the best

Dave

+16
source

For the published document, the method suggested by dkcwd did not work.

I found the following method in this page . Given the URL of a published document, e.g.

 https://docs.google.com/document/pub?id=[ID] 

Download link

 https://docs.google.com/document/export?format=[FORMAT]&id=[ID] 

where [FORMAT] can have one of the following meanings: pdf, doc, docx, oo, rtf, txt.

0
source

Source: https://habr.com/ru/post/907100/


All Articles