3

I'm developing an app that has access to user's appdata folder on Google Drive. When I am on debug mode, the app works fine. When I make a release of the app and I try to connect to Google Drive it give me this error after I choose which account to connect:

com.google.api.client.googleapis.json.GoogleJsonResponseException: 
403 Forbidden 
{
   "errors" : [ {
      "domain" : "global",
      "reason" : "insufficientScopes",
      "message" : "The granted scopes do not give access to all of the requested spaces.",
      "locationType" : "parameter",
      "location" : "spaces"
   } ],
      "code" : 403,
      "message" : "The granted scopes do not give access to all of the requested spaces."
}

I used this way to connect to Google Drive: https://developers.google.com/drive/v3/web/quickstart/android

I also make one credential for debug and one for release mode in Google Dev Console.

How can I solve this problem? Any help is apreciate. Thanks buddies!

Daniele
  • 1,030
  • 9
  • 20
  • Ok I solved adding some lines on proguard file. Thanks to http://stackoverflow.com/questions/14410520/google-drive-api-doesnt-play-well-with-proguard-npe – Daniele Mar 03 '16 at 10:55

1 Answers1

5

I had the same problem and the official ProGuard configuration here solved it for me:

https://github.com/google/google-api-java-client/blob/57fe35766cbba0a0d5a9a296be81468d730a29f8/google-api-client-assembly/proguard-google-api-client.txt

Emanuel Moecklin
  • 28,488
  • 11
  • 69
  • 85
  • Hello I also faced the same problem and I put the same code in my proguard file but I didn't get the success. Still I having 403 – Bhanu Sharma Nov 26 '19 at 13:34