I am trying to use google fit api in my android app. I followed this guide and created SHA-1 certificate using keytool.exe in my jdk 1.8 bin folder. I have now created Oauth
I've encountered this problem just now. Took me a few hours to figure out, so i would like to point out for those who make the same mistake.
My Google API client cannot connect only on Production, everything works fine on Development environment.
This is because my app was set up to use "App Signing". With this, if you created the Oauth Client ID using the Production Keystore's SHA1 (or Upload Certificate's SHA1 in the picture), it will not be used, because google will remove this certificate and change to the "App Signing" certificate
So what we need to do to fix the problem is simply create a new OAuth Client ID with this new SHA1 like so:
The issue is quite easy to encounter because most of any tutorial will tell you to find your Production SHA1 and use it in the API console. But except for if you use "App signing" then it won't work any more.