---
title: "Finish connecting a service"
method: POST
path: "/integrations/{provider}/link/complete"
tags: ["Connections"]
---

# Finish connecting a service

`POST /integrations/{provider}/link/complete`

## Request

- Base URL: `https://bodylab.lol/api/v1`
- URL: `https://bodylab.lol/api/v1/integrations/{provider}/link/complete`
- Auth: HTTP bearer

Takes what the service's redirect carried. The state is single-use and must be the one startLink issued to this athlete for this service; the code is exchanged once and never retried.

## Path parameters

- `provider` string, required: A connected service. Known values: garmin, oura, apple_health. Treat unknown values as "other".

## Headers

- `X-Client-Platform` string
- `X-Client-Version` string

## Request body

- object
  - `code` string, required
  - `state` string, required
  - `scope` string: The space-separated scopes the athlete granted.

## Response `200`

OK

- object
  - `status` 'connected', required

## Other responses

- `401`: Error: UNAUTHORIZED.
- `409`: Error: LINK_NOT_AVAILABLE, LINK_EXPIRED, LINK_ACCOUNT_IN_USE, NOT_OFFERED.
- `422`: Error: LINK_SCOPES_MISSING, LINK_ACCESS_DENIED, LINK_FAILED.

---

[API](https://skmtc.dev/bodylab/apis/body-lab-api.md) · [All operations](https://skmtc.dev/bodylab/apis/body-lab-api/llms.txt) · [OpenAPI document](https://skmtc.dev/bodylab/apis/body-lab-api/revisions/544c201eaf88?raw)
