1
votes

I have been developing a mobile app which uses HTTP POST/GET to retrieve the list of files/folders, upload/download files etc., which seems to work fine with GData Document List API's. Now that GDrive SDK V2 is available, I am moving to the new API's.

When I change the auth scope from https://docs.google.com/feeds/ to https://www.googleapis.com/auth/drive, I got a 400 error. I learnt that I need to configure the API console for using Google Drive SDK.

Here, the problem is while configuring the Google Drive SDK in API Console, it asks for Open URL (This URL is used when the user opens an existing Google Drive item with your application) which is not applicable for my app (this is only a file manager app).

Please let me know how can workaround this restriction.

Best regards, Karthik

Updates:

I am following instructions at https://developers.google.com/accounts/docs/OAuth2ForDevices

POST URL : https://accounts.google.com/o/oauth2/device/code

POST Body : client_id=xxxxx.apps.googleusercontent.com&scope=https://www.googleapis.com/auth/drive

HTTP Response : 400

Response Body :

{ "error" : "invalid_scope" }

If I have the POST Body as below it works client_id=xxxxx.apps.googleusercontent.com&scope=https://docs.google.com/feeds/

1

1 Answers

0
votes

You don't need to set up Open With and Create URLs if you just want to use the API without integrating with the Drive User Interface. The Drive API should work to replace your Documents List Integration.

Please make sure you are using v2 of the API, your scope issues could be related to using v1. We could check by pasting the request and response where you receive 400.