1

I am trying to get GoogleFit working on my android device and after i followed steps from https://developers.google.com/fit/android/get-api-key when i try to call GoogleFit.authorize() method all i get is :

{
  "message": "Authorization cancelled",
  "success": false,
}

I cannot resolve what am i doing wrong.I generated client_secrets.json file from GC for a RN project i have built but still i cannot get any response when i try calling this API.

Anyone had this issue?

Petar Petrovic
  • 163
  • 1
  • 1
  • 7

1 Answers1

0

I had the same problem some days ago. For me, the problem was related to the SHA-1 that I put into the Google Console.

I considered the wrong debug.keystore file, while running the following command:

keytool -list -v -keystore ./debug.keystore -alias androiddebugkey -storepass android -keypass android

If you're running your app into an emulator, you must use the local debug.keystore file (into <myApp>/android/app/debug.keystore), instead of the ~/.android/debug.keystore. Hope it helps

IgorMing
  • 1
  • 2