Fitbit API integration

Live

Your end users can connect this provider today.

Fitbit has the largest installed base of any dedicated wearable, which makes it the provider most consumer health products need first. It is also the API with the most historical baggage — the surface has accreted since 2011 and it shows in inconsistent date handling and endpoint shapes.

The single biggest constraint is intraday data. Second- and minute-level heart rate is not available to a standard application; it requires a separate approval from Fitbit for your specific use case. Plenty of teams design a feature around intraday heart rate before discovering they cannot have it.

WearLink normalises Fitbit's daily summaries and sleep logs into the shared schema and manages the Subscriptions API registration for you, including re-registration when a subscription is dropped on Fitbit's side.

How the Fitbit integration works

Authentication
OAuth 2.0 with PKCE, refresh-token rotation
Sync model
Pull + push via the Fitbit Subscriptions API. Notifications are notify-only.
API base
https://api.fitbit.com
Integration type
Cloud OAuth

Fitbit data available through WearLink

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

  • Steps
  • Sleep stages
  • Heart rate (intraday where granted)
  • Calories
  • SpO2
  • Activities & workouts
  • Weight

Webhook events you can subscribe to

steps.createdsleep.createdheart_rate.createdworkout.created

Connect a Fitbit user

Two calls: create a connect session for your end user, then read their normalised data. You never handle Fitbit 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": "fitbit"}'

# → { "connect_url": "https://wearlink.io/widget/connect?token=..." }
# Redirect the user there; they authorise fitbit 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=fitbit&days=7"

What makes the Fitbit 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.

Intraday data needs separate approval

Standard OAuth access gives you daily and activity-level summaries. Minute-level heart rate requires Fitbit to approve your application for intraday access, and consumer products are frequently declined.

Subscriptions tell you nothing useful on their own

The subscription notification says "collection X changed for user Y". You still fetch the data yourself. Budget for the second round trip.

Timezones are per-user and mutable

Fitbit reports in the user's device timezone, which changes when they travel. Storing raw local timestamps without the offset produces duplicate or missing days.

Fitbit API — frequently asked questions

Is the Fitbit API free?
Yes for standard access — you register an application and use OAuth 2.0. Intraday access is free but gated behind a separate manual approval from Fitbit.
Can I get minute-by-minute Fitbit heart rate?
Only if Fitbit grants your application intraday access. WearLink will surface whatever your credentials are approved for; we cannot grant access Fitbit has not given you.
Does Fitbit work alongside Google Health Connect?
Yes, and many Android users have both. WearLink deduplicates overlapping records using your configured provider priority so a single walk does not count twice.

Other integrations

Start with Fitbit — 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.