OAuth2 authorization for the Google Fit Rest API from Android app

68 views Asked by At

I have an Android app that is reading Google Fit data using the Android API. Since this API is being deprecated I am now trying to switch to accessing the data from Google Fit Rest API instead.

However, I am a bit stuck on the OAuth2 authorization part to get the access token. I got as far as getting authenticated using Google signin and have received the server auth code but now i need to exchange it for the access token.

It seems most guides assume that I have a backend server that can store the client secret. But in my case i want to access the API directly from my Android app. Any help would be much appreciated.

P.S I don't want to use HealthConnect since it is tied to the Android device and can not access data that was stored in Google Fit with other devices.

0

There are 0 answers