0

Everything I see about Google Drive authentication requires some crazy OAuth monstrosity, but I actually do not need to authenticate to see a public (shared) folder, only the Application ClientID/Secret thing to use the API in the first place.

So, given a Google Drive URL of a publicly shared folder with publicly shared files inside, how do I enter that into the API so I can simply list the files?

jazb
  • 5,498
  • 6
  • 37
  • 44
Blindy
  • 65,249
  • 10
  • 91
  • 131
  • possible duplicate? : https://stackoverflow.com/questions/18116152/how-do-i-get-a-file-list-for-a-google-drive-public-hosted-folder – jazb Dec 20 '18 at 02:39
  • Unfortunately, although the files in a shared folder cannot been retrieved without authorization, you can retrieve all files in a shared folder using API key like ``https://www.googleapis.com/drive/v3/files?q='### folderId ###'+in+parents&key={YOUR_API_KEY}``. Because Drive API is required to be used for retrieving file list. For this, API key is used. For downloading files in the shared folder can be downloaded without authorization. If this was not what you want, I'm sorry. – Tanaike Dec 20 '18 at 03:53
  • I'm trying something very similar to that, I'm having issues passing it a valid key for some reason. – Blindy Dec 20 '18 at 06:20
  • @Blindy Can I ask you about "some reason"? Although I'm not sure whether this is related to your issue, for example, is Drive API of API key enabled at API console? If Drive API is not enabled, an error occurs. – Tanaike Dec 20 '18 at 08:09
  • I got it to work, the reason was that the key I had was for oauth, I had to request a new key specifically for 'api'. Confusing as all hell, but it’s working fine now, thank you! – Blindy Dec 28 '18 at 08:46

0 Answers0