---
title: "Initiate Provider Connection"
method: POST
path: "/health-providers/{provider}/connect"
tags: ["health-providers"]
---

# Initiate Provider Connection

`POST /health-providers/{provider}/connect`

Initiate OAuth connection with a health provider.

Returns an authorization URL that the app should open in a browser/webview.
The user will authenticate with the provider and be redirected back to the app.
Anonymous Firebase tokens are accepted so onboarding can begin before a
User exists; identity is resolved on the callback.

## Path parameters

- `provider` 'garmin' | 'whoop' | 'coros' | 'terra' | 'apple_health', required — Health data providers (OAuth connections).

## Request body

- HealthProviderConnectRequest — Request to initiate OAuth connection with a health provider.
  - `redirect_uri` string, required — Deep link URI where the app will receive the OAuth callback

## Response `200`

Successful Response

- HealthProviderConnectResponse — Response with authorization URL for OAuth flow.
  - `authorization_url` string, required — URL to redirect user for authorization
  - `state` string, required — State parameter to validate callback

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/imperfect/apis/imperfect-api.md) · [All operations](https://skmtc.dev/imperfect/apis/imperfect-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imperfect/apis/imperfect-api/revisions/d8d6176c9f61?raw)
