Wearables Tools
Manage wearable connections — list, link, disconnect.
listConnectedDevices
Lists active connections only — disconnected providers are excluded. Call this before any health data tool. If a data tool returns empty, this tells you whether the user actually has the relevant device connected.
Parameters: none
Returns: JSON with connectedDevices array (provider, status, connection date).
listAvailableIntegrations
Lists providers the user can connect that aren't currently active. Available providers: APPLE_HEALTH_KIT, GARMIN, OURA, PELOTON, WAHOO, EIGHT_SLEEP, WITHINGS.
Parameters: none
Returns: JSON list with key, human-readable name, and description.
generateLinkToken
Generates a browser-based connection link. Do not use for Apple Health.
| Parameter | Required | Notes |
|---|---|---|
integrationKey | yes | Provider key (e.g. GARMIN, OURA). Cannot be APPLE_HEALTH_KIT. |
redirectUrl | yes | Where to send the user after authorization. Typically the host app's session origin. |
Returns: JSON with linkToken, linkWebUrl, and provider.
Errors: if the user is already connected to the provider, returns an error — check with listConnectedDevices first.
generateAppleHealthCode
The only way to connect Apple Health. Returns two options:
- Connection code — a one-time code to enter in the Junction app
- Deep link —
betti://settings/wearables?autoConnect=APPLE_HEALTH_KITopens the Betterness iOS app and starts the connection automatically
Present both to the user and let them choose.
Returns: JSON with connectionCode, provider, appDeepLink, and instructions.
disconnectIntegration
Removes the connection between user and provider.
| Parameter | Required |
|---|---|
integrationKey | yes |
Returns: success or error.

