Apple HealthKit API integration

Mobile SDK

On-device only. This requires your own mobile app — there is no cloud API for it.

Apple Health has no cloud API and never has. Apple does not operate a server you can call — HealthKit is an on-device framework, and the only way to get the data is to run code inside an iOS app the user has installed and granted permission to.

This is the single most misunderstood fact in wearable integration. No aggregator can offer you "Apple Health via OAuth", including WearLink and including every competitor that lists an Apple logo on its homepage. If you have no iOS app, you have no Apple Health data.

What WearLink provides is the other half: a Swift SDK that reads the HealthKit types you request and pushes them into the same normalised pipeline as every cloud provider, so Apple Health data arrives in your backend in the identical shape to Oura or WHOOP data. There is also an import path for the Health app's export XML for one-off historical loads.

How the Apple Health integration works

Authentication
On-device user permission per data type, via HealthKit
Sync model
SDK push from your iOS app, plus Health export XML import.
API base
On-device (HealthKit) — no cloud API exists
Integration type
Mobile SDK

Apple Health data available through WearLink

Everything below arrives in the shared normalised schema. The same field names and units apply whether the record came from Apple Health or from any other provider, so your scoring, charting and storage code is written once.

  • Steps
  • Heart rate
  • Workouts
  • Activity rings
  • Whatever else the user grants

Webhook events you can subscribe to

steps.createdheart_rate.createdworkout.created

Connect a Apple Health user

Two calls: create a connect session for your end user, then read their normalised data. You never handle Apple Health OAuth credentials, token refresh or webhook registration.

# 1. Create a connect session for your end-user
curl -X POST https://wearlink.io/api/v1/connections/session \
  -H "Authorization: Bearer $WEARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "'"$USER_ID"'", "provider": "apple-health"}'

# → { "connect_url": "https://wearlink.io/widget/connect?token=..." }
# Redirect the user there; they authorise apple-health and land back on your redirect_uri.

# 2. Pull normalised data whenever you want
curl -H "Authorization: Bearer $WEARLINK_API_KEY" \
  "https://wearlink.io/api/v1/users/$USER_ID/summaries?provider=apple-health&days=7"

What makes the Apple Health API hard to integrate directly

These are the things that turn an estimated one-week integration into a one-month one. They are worth knowing whether you use WearLink or build it yourself.

There is no cloud API — this is not a WearLink limitation

If a vendor implies Apple Health works without your own iOS app, they are describing something that does not exist. HealthKit is on-device only.

Permissions are per-type and silently partial

A user can grant steps and deny heart rate, and HealthKit does not tell you which were denied — a denied type is indistinguishable from a type with no data.

The device is the source of truth

If the phone is offline or the app has not been opened, nothing syncs. Background delivery helps but does not guarantee timeliness.

Apple Health aggregates other apps

Data in HealthKit may have originated in a third-party app, so you can see the same workout twice — once from HealthKit and once from its original provider.

Apple Health API — frequently asked questions

Can I get Apple Health data without building an iOS app?
No. HealthKit is an on-device framework with no server component. Any product claiming otherwise is either describing the Health export XML file or is wrong.
Does WearLink have an iOS SDK?
Yes, a Swift package covering providers, connections, summaries and meal-photo upload. It currently ships as source; CocoaPods and Swift Package Index publishing is in progress.
How do I avoid double-counting Apple Health and Strava?
Set a provider priority. When the same workout arrives from both HealthKit and its original source, WearLink keeps the higher-priority copy.

Other integrations

Start with Apple Health — free for up to 3 users

No credit card. Create an account, add your provider credentials once, and your users connect through a hosted widget or our mobile SDK.