As before, I asked a question because it was too lazy to work on this more difficult. But I managed to solve it at the end. So here is the solution for Google Drive:
1 / Perform all OAuth 2.0 dances to access the [IMAGE_FOLDER_ID] folder. The application must be authenticated / authorized, even if the folder is open.
2 / don't forget to download the Google Drive service API
gapi.client.load ('drive', 'v2', makeRequestCB)
... and here's a loop to get the file urls
function makeRequestCB() { gapi.client.drive.files.list({ 'q': '"[IMAGE_FOLDER_ID]" in parents', 'fields' : 'items/id' }).execute(function(resp) { var picAlbumLst = '<ul id="slider">'; for (i=0; i<resp.items.length; i++) { var id = resp.items[i].id; picAlbumLst += ('<li><img src="https://docs.google.com/uc?id='+id+'"/></li>'); } picAlbumLst += "</ul>\n"; }); }
Hope this helps.
source share