1

I need to use Google Drive public folders to fetch images (for a gallery plugin).

I'm trying to reach the simplest approach possible, without authentication. Until now I found the webViewLink https://googledrive.com/host/FOLDER-ID but it returns an HTML page.

I can setup a script to get images from there, but I'm wondering if I missed an easier system to get XML or JSON data instead.

a-coder
  • 291
  • 2
  • 14
  • 1
    There is no such thing as without Authentication. You need to be authenticated to access Google Drive https://developers.google.com/drive/v2/reference/files/list – Linda Lawton - DaImTo Apr 09 '15 at 11:39
  • From what I understood, that is made to retrieve a single file. I need to list all files within – a-coder Apr 09 '15 at 11:42
  • Check the link i posted https://developers.google.com/drive/v2/reference/files/list returns a list of files. – Linda Lawton - DaImTo Apr 09 '15 at 11:43
  • Still not able to figure out which URL to use, could you make an example? Also, this requires an authorization. – a-coder Apr 09 '15 at 11:49
  • You MUST be Authenticated to access the Google drive API. There is an example of how to use File.list on the page https://developers.google.com/drive/v2/reference/files/list – Linda Lawton - DaImTo Apr 09 '15 at 11:51
  • But I specified to not use any authentication: must be a paste-url/fetch-images system. I'm already in a complex context. Would be a problem to setup an authentication interface – a-coder Apr 09 '15 at 11:53
  • 1
    So because you don't want to use authentication you think there should be a way of doing it without authentication? Googles Drive API does not allow this. It clearly states throughout the API that you must be authenticated to use there API.. – Linda Lawton - DaImTo Apr 09 '15 at 11:54
  • You may want to consider AWS S3 storage. You can choose to make the buckets public and access them as web content. Very inexpensive but has a learning curve. Cloudberry shortens the learning curve. I have 100GB of mp3 there, for $2-3 a month. – Misunderstood Apr 09 '15 at 16:55

1 Answers1

1

NO it is not possible to use Google Drive API with out first being authenticated.

Google drive list page clearly states at the top

Requires authorization

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • I'll stick with webViewLink + HTML parsing workaround then. Thanks in any case! – a-coder Apr 09 '15 at 11:58
  • 1
    If this is just a script to rip data out of your own Google drive directory. Its really not that hard to set up service account authentication. – Linda Lawton - DaImTo Apr 09 '15 at 12:00
  • Not a matter of easy/hard but will be a little part of a big plugin and would be an hassle to ask users to make more steps. Then I really just need to list out images, nothing more. – a-coder Apr 09 '15 at 12:01
  • 2
    @a-coder "webViewLink + HTML parsing workaround then" Seriously!!!!! You've been told how to do this correctly, but instead of taking the advice, you'll hack something together which is guaranteed to fail as soon as Google changes the layout of the page. *face-palm* – pinoyyid Apr 09 '15 at 14:24