8

Im really confused from Google Api platform. Recently guide leads you to generate oAuth Client ID JSON. On the other hand there is no clear reason or need to generate or have at all. Im doing these steps to enable Google Fit on Android:

  1. Get a project on Google APIs
  2. Enable Google Fit API
  3. Create OAuth Client ID on Android
  4. Provide fingerprint and package name (ApplicationID) that's it ..

but what is the usage of that Json file of OAuth Client ID ? or that client Id?

111111111111-aaaaaaaaaaaaaaa.apps.googleusercontent.com (sample)

Maher Abuthraa
  • 17,493
  • 11
  • 81
  • 103

1 Answers1

7

The OAuth Client ID is obtained so that your app can access the Google Fit API. As the SHA-1 of your certificate is already known by Google Fit, you do not need to enter the actual Client ID into your code. Your certificate is part of your app, and identifies the app to Google Fit.

https://developers.google.com/fit/android/get-api-key

Sharon
  • 86
  • 1
  • 2
  • 1
    It seems that using the debug certificate's SHA-1, the OAuth Client ID only works if I select in my app the same Google account used to create the Client ID in the console. Is that correct? Otherwise I can't pass through the authorization. – Juangui Jordán Jul 23 '19 at 10:04