wearables surface:
| Model | Providers | Where the user grants access |
|---|---|---|
| ForeverBetter Connect (consumer app) | Google Health Connect, including Fitbit/Samsung Health/Google Fit sources | On-device Android app |
| Mobile bridge (SDK) | Apple HealthKit, Samsung Health, Google Health Connect | On-device, in your own mobile app |
| Server OAuth | WHOOP | Redirect from your app |
(organization_id, user_id), so each of
your users only ever sees their own data.
1. Get an organization-scoped key
Issue a Builder-or-higher API key for your organization. Mint short-lived, per-user tokens from your backend (service-account mode) so each request is scoped to the acting end-user.2. Consumer Android path: ForeverBetter Connect
For a user connecting their own Android wearables, direct them to the ForeverBetter Connect app. It signs them into the same ForeverBetter account, lets them choose Google Health Connect, requests read permissions, and runs background sync. Google Health Connect can aggregate multiple Android sources, including Fitbit, Samsung Health, and Google Fit. The user flow is:- Install ForeverBetter Connect from the current ForeverBetter beta or Google Play distribution.
- Sign in with the same email as the dashboard or agent.
- Choose Google Health Connect and grant the requested permissions.
- Start sync and wait for the first upload.
- Refresh the dashboard or call
GET /sourcesbefore analyzing.
https://api.foreverbetter.xyz.
3. Product teams: embed the SDK (HealthKit / Health Connect / Samsung)
This is the widest-coverage path and the least friction for users. Add theopen_wearables_health_sdk
Flutter plugin to your app. It handles permissions, background sync, incremental
(anchored) queries, secure token storage, and token refresh automatically.
- Your app signs the user in and obtains an access token + refresh token.
- The SDK requests Health Connect / HealthKit read permissions on-device.
- It reads new records and syncs them in the background to the wearable hub.
- The API reads the hub and normalizes readings under that user.
GET /sources and is ready to analyze
immediately.
4. Server OAuth: WHOOP
For WHOOP, your app initiates OAuth through the API:5. Sync and keep tokens fresh
Pull data on a schedule (orasync: true to queue it):
refresh_token (plus client_id /
client_secret) on the sync request and a 401 auto-refreshes once, returning the
rotated token in refreshed_token for you to persist. You can also refresh
explicitly:
6. Use the data
Once synced, wearable data flows through the same pipeline as everything else:POST /wearables/analyze, POST /analyses (multimodal), POST /users/{id}/trends,
and POST /users/{id}/health-context. Set retest and check-in cadence with
GET /users/{id}/retest-reminders.