Connections

Finish connecting a service

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.

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

Path parameters

providerstring required

A connected service. Known values: garmin, oura, apple_health. Treat unknown values as "other".

Headers

X-Client-Platformstring

The native client's platform, e.g. ios. Server-side and non-native callers omit it.

X-Client-Versionstring

The native client's own semver version. With X-Client-Platform, a version below that platform's minimum is refused with CLIENT_UPGRADE_REQUIRED (426).

Request body

codestring required
statestring required
scopestring

The space-separated scopes the athlete granted.

Response

OK

status'connected' required

Changes

No recorded changes to this operation across all 1 revision of this API.