health-providers
Handle Provider Callback
Handle OAuth callback from health provider.
The app should call this endpoint after receiving the OAuth callback with the authorization code and state parameters. user may be None during first-time onboarding when the caller holds an anonymous Firebase token — identity is resolved via _link_provider_identity.
Flow:
- Validate OAuth state
- Delegate code exchange + token storage to alice
- Resolve mapping via _link_provider_identity (branches on whether the provider identity is new, already-owned, a collision, or recoverable).
post/health-providers/{provider}/callback
Path parameters
provider'garmin' | 'whoop' | 'coros' | 'terra' | 'apple_health' required
Health data providers (OAuth connections).
Query parameters
login_onlyboolean
When true, return 404 if the provider identity does not already map to a User. Used by the mobile login flow to avoid auto-creating ghost accounts.
When true, return 404 if the provider identity does not already map to a User. Used by the mobile login flow to avoid auto-creating ghost accounts.
Headers
x-device-timezonestring nullable
Request body
Response
Successful Response
Changes
No recorded changes to this endpoint across all 1 revision of this API.