3

I'm having an issue using Google Drive using Ruby.

I can create an OAuth2 client and start making authenticated calls.

I have to query the Google Documents List first in order to fetch a list of files, once I have the file IDs I try to query the Google Drive API like this:

GET https://www.googleapis.com/drive/v1/files/0B9N873iFyYR7MkRfeTAxxxxxxx?access_token=ya29.AHES6ZRckKZ2jZfC6risUtH9ZZxxxxxxxxx

However I'm getting this:

{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "appNotInstalled",
    "message": "The authenticated user has not installed the app with client id xxxxx.apps.googleusercontent.com"
   }
  ],
  "code": 403,
  "message": "The authenticated user has not installed the app with client id xxxxx.apps.googleusercontent.com"
 }
}

This client id refers to an application I created via Google API Dashboard, not the Chrome Web Store.

Anyway I tried to setup a hosted Chrome Web App, configured (and paid) everything to allow a list of test users, but still I get the same error message although the app is installed correctly from the market (not local copy).

With the same client and credentials I'm able to call https://docs.google.com/feeds/ endpoints but not drive ones.

My scopes are rather complete: 'https://docs.google.com/feeds/,https://docs.googleusercontent.com/,https://spreadsheets.google.com/feeds/,http://gdata.youtube.com,plus.me,drive.file,userinfo.email,userinfo.profile'(don't look at the format, it gets fixed automatically afterwards) and they works well.

I'm not using the Drive UI, I just want to use server-side APIs. Thanks for any hints.

kain
  • 5,510
  • 3
  • 27
  • 36
  • I may have missed a step: http://stackoverflow.com/questions/10345904/why-am-i-getting-the-authenticated-user-has-not-installed-the-app-with-client-i – kain Apr 28 '12 at 11:09
  • Did all the procedure but the error is still the same. – kain Apr 28 '12 at 11:22

1 Answers1

5

Have you set the "api_console_project_id" : "xxxxxxxxxxxxx" argument in your manifest ? An example is provided here: manifest.json

Ranumao
  • 413
  • 4
  • 17
  • Wow, it worked. Actually I set ``` "container" : "GOOGLE_DRIVE", "api_console_project_id": "101xxxxxx", ``` and now I got another error (403). I'm totally blocked since I learn that the user must give explicit permission to the app to access the file :\ – kain Apr 28 '12 at 11:31
  • The 403 error may be the one here - http://stackoverflow.com/questions/10368678/google-drive-http-403-access-not-configured-error-with-dredit – Frodo Baggins Apr 29 '12 at 08:13