# ovok.wearables

Canonical page: https://docs.ovok.com/web-sdk/core/namespaces/wearables

`ovok.wearables` has two halves. `providers` holds a project's provider settings and is for admins. `connections` is the patient app's side: connect a provider, sync its data and disconnect. Providers are `oura`, `whoop`, `strava`, `withings`, `polar`, `suunto`, `garmin` and `ultrahuman`.

## Connect a provider [#connect-a-provider]

```ts
const { authorizationUrl } = await ovok.wearables.connections.authorize('oura');
```

- `authorize` returns the provider's one-time consent page. Open `authorizationUrl` for the patient, who grants access there.
- `list` shows the patient's current connections.

## Sync data [#sync-data]

```ts
const result = await ovok.wearables.connections.sync('oura');

console.log(result.created, result.syncedThrough);
```

- It reports how many observations were created and the time the data was synced up to.

## Disconnect [#disconnect]

```ts
await ovok.wearables.connections.delete('oura');
```

## Configure providers [#configure-providers]

```ts
const providers = await ovok.wearables.providers.list();

const oura = await ovok.wearables.providers.retrieve('oura');
```

- `create`, `patch` and `delete` change a provider's settings for the project.
- The calls go to `v1/wearables/providers` and `v1/wearables/connections`.

## Reference [#reference]

- [wearables API reference](/web-sdk/core/reference/core/wearables): every method and type.
- [ovok.measurements](/web-sdk/core/namespaces/measurements) for how readings are stored.
- [Errors and retries](/web-sdk/core/errors-and-retries)
