Skip to content

Mobile SDK

Google Health Connect API integration

Mobile SDK · on-deviceOn-device only. This requires your own mobile app — there is no cloud API for it, from any vendor.Backend ready; Android SDK skeleton ships in Kotlin package

Google Health Connect device illustration

Health Connect is Android's on-device health data store and the successor to Google Fit. This matters urgently: the Google Fit APIs have been deprecated, and products still calling them are on a clock.

Like HealthKit, Health Connect is on-device. There is no cloud endpoint to call, so an Android app is a prerequisite. Unlike HealthKit, it is a separate system component rather than a built-in framework, which means availability varies by Android version and by whether the user has it set up.

WearLink's Kotlin SDK reads Health Connect records and pushes them into the same normalised pipeline as the cloud providers. If you are migrating off Google Fit, this is the replacement path.

Connect a Google Health Connect user

Two calls. The first mints a hosted connect URL for your end-user; the second reads the normalised summaries once they have authorised with Google Health Connect. Subscribe a webhook to receive the same objects as they land.

connect + read — google-health-connect
# 1. Create a connect session for your end-user
#    The API key goes in X-WearLink-API-Key, not in Authorization.
curl -X POST https://wearlink.io/api/v1/connections/session \
  -H "X-WearLink-API-Key: $WEARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "'"$USER_ID"'", "provider": "google-health-connect", "redirect_uri": "https://yourapp.com/connected"}'

# → { "connect_url": "https://wearlink.io/widget/connect?token=...", "expires_in": 3600 }
# Redirect the user there; they authorise google-health-connect and land back on your redirect_uri.
# The token is scoped to that one user — it is safe to put in a browser URL.

# 2. Pull normalised data whenever you want
curl -H "X-WearLink-API-Key: $WEARLINK_API_KEY" \
  "https://wearlink.io/api/v1/users/$USER_ID/summaries?provider=google-health-connect&days=7"

Google Health Connect data available through WearLink

  • Steps
  • Heart rate
  • Sleep
  • Workouts
  • Whatever else the user grants

Webhook events you can subscribe to

  • steps.created
  • heart_rate.created
  • sleep.created
  • workout.created

Normalised families this provider feeds: Sleep, Heart Rate Variability, Heart Rate, Workouts, Steps & Daily Activity, Calories & Energy, Blood Glucose & CGM, Blood Pressure, Body Composition, Nutrition & Energy Balance.

What makes the Google Health Connect API hard to integrate directly

These are the things that turn an estimated one-week integration into a one-month one.

Google Fit is deprecated — migrate

The Google Fit APIs are being retired in favour of Health Connect. Anything still built on Fit needs a migration plan, not a monitoring plan.

On-device only

No server API. Without an Android app you cannot read Health Connect data.

Availability is not universal

Health Connect depends on Android version and user setup. Your app needs a graceful path for devices where it is absent.

It aggregates other apps, so duplicates happen

The same workout can arrive from Health Connect and from its originating provider. Provider priority resolves it.

FAQ

Google Health Connect API — frequently asked questions

Is Google Fit still supported?
The Google Fit APIs are deprecated in favour of Health Connect. New integrations should target Health Connect, and existing Google Fit integrations need a migration plan.
Do I need an Android app for Health Connect?
Yes. Health Connect is an on-device data store with no cloud API, so the data can only be read by an app running on the device.
What does WearLink provide for Health Connect?
A Kotlin/JVM SDK that reads the record types you request and pushes them into the same normalised pipeline as every cloud provider, so the backend shape is identical.

Start with Google Health Connect — free for up to 3 users

No credit card. Your API key is issued at sign-up, and the hosted connect flow works from the first request.