Question

We are building a web application that should get all files from a specific folder in our Drive (read only). The problem is that I can't find a way to access our files without using OAuth. Basically I would want to request our files using AJAX and present the contents of them on a page (without the user having to do anything). Is this at all possible and have I missed something?

Whenever I try something without using OAuth I get a global internalError (being related to authorization according to the current documentation).

The experience I'm trying to achieve:

User enters http://domain.com/posts > Get all public files from folder Y > Sort them by date > Show the titles in HTML > User clicks title > User is presented with full contents of the file as HTML.

Is this possible?

Thanks in advance! :)

UPDATE: To clarify: I would want to depend on our API key only.

Était-ce utile?

La solution

You can do it this way, without using Google Drive API:

  1. Make the folder public
  2. Copy the folder ID from the URL
  3. Append it to https://googledrive.com/host/ e.g. https://googledrive.com/host/0BzEbtMoF6IXbaVN2Qmx1em9qS0k/

You will get a directory index with all files listed and if the (sub)folder contains an index.html file, it will be rendered instead.

To get the JSON or XML file list, use YQL.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top