Search code examples
androidgoogle-oauthgoogle-fit

What is the usage of OAuth 2.0 client id from Google Fit on Android


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)


Solution

  • 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