Integrations

Connect a wearable

Advanced Labs supports WHOOP as a data source through the provider's OAuth 2.0 authorization flow. This screen is a consent preview: the authorization endpoint is not wired up in this sample build, and no wearable data has been imported.

WHOOP

Wearable recovery, sleep, cycle and workout data via OAuth 2.0

Not connected

Your wearable data will be imported into Advanced Labs only after you complete authorization with the provider and grant the scopes below. Until then, every metric in this app is synthetic sample data. You can revoke access at any time from your provider account, and Advanced Labs will stop importing on the next scheduled sync.

6 of 6 scopes selected

Requested scopes

Deselect anything you would rather not share — the related view degrades gracefully

Integration placeholder

For the team wiring this up server-side

  1. Store the provider client ID and client secret as server-side secrets. Never ship the client secret, tokens or refresh tokens to the browser bundle.
  2. Build the authorize redirect on the server with a signed, single-use state value and the scope string below, then exchange the returned code for tokens in a server handler.
  3. Persist access and refresh tokens encrypted, keyed to the authenticated Advanced Labs user, and refresh them from a scheduled server job that also runs the metric backfill.
# scope string requested at authorization time
read:recovery read:cycles read:workout read:sleep read:profile read:body_measurement

# server-side redirect target (placeholder — not wired in this build)
POST /api/integrations/whoop/authorize   -> builds provider consent URL + state
GET  /api/integrations/whoop/callback    -> exchanges code, encrypts tokens
POST /api/integrations/whoop/sync        -> scheduled backfill + refresh

How authorization works

Four steps, no password sharing

  1. 1Review the scopesYou see every permission and what it powers before anything leaves your device account.
  2. 2Authorize on the providerYou are handed to the provider's own consent screen. Advanced Labs never sees or stores your provider password.
  3. 3Return with a grantThe provider redirects back with a short-lived authorization code. Advanced Labs exchanges it server-side for tokens that stay server-side.
  4. 4Backfill, then scheduled syncAvailable history is imported once, then refreshed on a schedule. This is a batch import, not a live stream from your device.

What Advanced Labs will not do

  • Claim live or real-time access to your device. Imports are scheduled batches of already-recorded data.
  • Read anything outside the scopes you approve on this screen.
  • Diagnose, treat or make any medical determination from wearable or lab data.
  • Share your data with advertisers or sell it to third parties.

WHOOP is a trademark of its owner. Advanced Labs is an independent platform and is not affiliated with, sponsored by or endorsed by WHOOP. Provider names are used only to describe the integration.