0

How do I use the Google drive API to download a publicly accessible file? I can see the file and download it from an incognito tab.

But the GDrive API seems to always need authorization. That makes it hard to download programmatically in a public demo.

This file, for example. I've removed the flag for the security update. https://drive.google.com/file/d/0ByZjGXodIlspWmpBcUhvenVQa1k/view?resourcekey=0-0EDZ0S61PjdzFLa6nWo3yw

I can download this file without authorization from an incognito Chrome tab. How does a python program do it?

Thanks.

-- Malcolm

  • The [file.get](https://developers.google.com/drive/api/v3/reference/files/get) method wont require authorization if the file is public you just send an api key. Edit your question and include [example] and i will have a look. – Linda Lawton - DaImTo Jul 02 '22 at 18:33
  • I'm sorry, the only code sample I can find is this one, but it requires authorization credentials. https://stackoverflow.com/questions/60111361/how-to-download-a-file-from-google-drive-using-python-and-the-drive-api-v3. I'm not sure where to start. – Malcolm Slaney Jul 04 '22 at 00:44
  • Add `&key+[YOUR API KEY]` to the url. You can get your API key from the GCP console. – Rafa Guillermo Jul 04 '22 at 07:16

0 Answers0