How do you send Health Connect data to your server?

Health Connect has no cloud API, so your Android app reads it and uploads it. With HC Sync you mint a token on your server, start the SDK in the app, then read REST or receive signed webhooks. Free for 5 users.

Last updated: 2026-11-06. HC Sync is Android only; Apple HealthKit is not supported yet.

How does Health Connect data reach your server?

Health Connect lives on the phone, so the path is always phone first. Your Android app reads permitted records and uploads them; HC Sync stores them and exposes them to your backend. Three steps:

1. Mint a scoped user token on your server

Use your project’s secret key, which must stay on your server. Each token can write one user only.

// Node 18+, on your backend
const res = await fetch("https://hcsync.dev/v1/user-tokens", {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.HCSYNC_SECRET}` },
  body: JSON.stringify({ user_id: "maya" }),
});
const { token } = await res.json(); // send this to the signed-in user's app

2. Start sync in your Android app

Add the library from the HC Sync Maven repository, configure it with the token and the data types you need, then start after the user grants permission.

// settings.gradle.kts: repositories { maven("https://hcsync.dev/maven") }
implementation("dev.hcsync:hcsync:0.3.0")

HcSync.configure(context, userToken, types = setOf("steps", "sleep", "heart_rate"))
val ask = registerForActivityResult(HcSync.permissionContract()) { HcSync.start(context) }
ask.launch(HcSync.permissions(context))

It backfills 30 days, then syncs hourly in the background, or when your app calls syncNow() on devices without background access. React Native and Expo apps can use the TypeScript wrapper.

3. Read it from your backend

curl "https://hcsync.dev/v1/records?user_id=maya&type=steps&limit=100" \
  -H "authorization: Bearer $HCSYNC_READ_KEY"
curl "https://hcsync.dev/v1/summary?user_id=maya&days=7" \
  -H "authorization: Bearer $HCSYNC_READ_KEY"

Or set a webhook with PUT /v1/webhook and receive signed records.synced events. Verify the timestamp and HMAC against the raw body before parsing; the documentation has full Express and Flask receivers, and this page covers retries and replay.

How can you test without a phone?

POST /v1/sample-data with your secret key loads sample data for a test user so you can exercise REST and webhooks first. It does not prove a real device integration, so test a real Android phone before launch.

What about consent and data handling?

What are the limits?

Android only, no iPhone or HealthKit yet. Real data needs an installed Android app. Free covers 5 synced users; Starter and Indie check out through Paddle.

Start free (5 users)   Read the quickstart

Common questions

Can my server call Health Connect directly?

No. Health Connect has no cloud REST API. An Android app on the user’s phone must read it and upload it.

Which data types can I sync?

Steps, distance, active and total calories, heart rate, resting heart rate, HRV, SpO2, sleep sessions with stages, exercise sessions and weight.

Does it work with React Native or Expo?

Yes, through the HC Sync TypeScript wrapper on top of react-native-health-connect. Expo needs a development build, not Expo Go.

How do I get data in real time?

Set a webhook URL. HC Sync sends signed events after uploads; return any 2xx within 5 seconds. Sync itself happens hourly in the background or when your app calls syncNow().

Is there a free plan?

Yes: 5 synced users, no card. Paid plans are open: Starter $29/month (100 users) and Indie $149/month (1,000), through Paddle.