2

I have integrated Google Classroom Api's in my android application and every thing was working fine for last couple of months but now I am start getting below error every time I am trying to fetch courses list from classroom

Error:

403 Forbidden { "code":403, "errors":[ { "domain":"global", "message":"Google Classroom API has not been used in project google.com:api-project-60894XXXXXXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/classroom.googleapis.com/overview?project=google.com:api-project-60894XXXXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "reason":"forbidden" } ], "message":"Google Classroom API has not been used in project google.com:api-project-608941808256 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/classroom.googleapis.com/overview?project=google.com:api-project-60894XXXXXXX then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "status":"PERMISSION_DENIED" }

Note: I have implemented Google Classroom integration from the below documentation https://developers.google.com/classroom/quickstart/android

Also, Every thing is working fine on my unsigned/debug build.

So my question is as I haven't disabled any permission and also it is working fine on debug/unsigned build/apk what could be the possible reason and solution.

Surya Prakash Kushawah
  • 3,185
  • 1
  • 22
  • 42

1 Answers1

1

You release build should use a different key than the debug one (in the classroom they create a debug one in /.android/debug.keystore).

The key SHA1 must be entered on Google API console, make sure your release SHA1 is entered on the console as well. Re-do the step 2.a of the classroom with the release SHA1 if needed.

Nicolas Defranoux
  • 2,646
  • 1
  • 10
  • 13
  • Does it required another project to be create on Google API console where the signed SHA1 key is saved along with the package name ? – Abhijit Srivastava Dec 16 '16 at 06:24
  • You don't need another project, you can a new credential to an existing project. In the wizard proposed step 2a, you can select an existing project and go directly to step 2d (Create new credentials) – Nicolas Defranoux Dec 16 '16 at 07:37