---
title: "Integration Guides"
canonical: "https://aifitnessapi.com/integrate"
type: "cluster-index"
pages: "11"
last_reviewed: "2026-08-12"
publisher: "AIFitnessAPI"
---

# Integration Guides

> 11 pages. Each entry below shows the question the page owns, followed by its answer capsule.

## How to Integrate Apple HealthKit (2026)

- Question: how to integrate Apple HealthKit
- HTML: https://aifitnessapi.com/integrate/healthkit
- Markdown: https://aifitnessapi.com/integrate/healthkit.md
- Last reviewed: 2026-07-09

Apple HealthKit gives your iOS app read and write access to the user's on-device health and fitness data, including steps, workouts, and heart rate, through a local store called HKHealthStore. It is not an OAuth cloud API and has no tokens or server endpoints: the user grants access in a system permission sheet and your Swift code reads the data directly on the device. To integrate it you add the HealthKit capability plus Info.plist usage-description keys, call requestAuthorization(toShare:read:), then query data with classes like HKStatisticsQuery. One critical caveat is that HealthKit never tells you whether read access was granted, so you must run the query and treat an empty result as no data or no permission.

## How to Integrate Google Health Connect (2026)

- Question: how to integrate Google Health Connect
- HTML: https://aifitnessapi.com/integrate/google-health-connect
- Markdown: https://aifitnessapi.com/integrate/google-health-connect.md
- Last reviewed: 2026-07-09

Google Health Connect gives Android apps on-device access to health and fitness data (steps, heart rate, sleep, calories, and more) from a single OS-managed store. It is not an OAuth cloud API: the user grants access in a system permission sheet and your Kotlin code reads records locally through the androidx.health.connect:connect-client library. It is free and Android-only. The one hard requirement before shipping is a Play Console health-data declaration listing every data type you read or write.

## How to Integrate the Fitbit API (2026)

- Question: how to integrate the Fitbit API
- HTML: https://aifitnessapi.com/integrate/fitbit-api
- Markdown: https://aifitnessapi.com/integrate/fitbit-api.md
- Last reviewed: 2026-07-09

The Fitbit Web API returns a user's activity, steps, heart rate, sleep, and profile data after they authorize your app over OAuth 2.0 (authorization-code grant, PKCE recommended). You register an app, send the user through Fitbit's authorize page, exchange the code for a Bearer access token, and call the REST API with it. Critically, the legacy Fitbit Web API is being turned down around September 2026 (exact day TBD, verify) and replaced by the Google Health API using Google OAuth 2.0 — tokens do not transfer and users must re-consent, so new integrations should target Google Health directly.

## How to Integrate the Strava API (2026)

- Question: how to integrate the Strava API
- HTML: https://aifitnessapi.com/integrate/strava-api
- Markdown: https://aifitnessapi.com/integrate/strava-api.md
- Last reviewed: 2026-07-09

The Strava API gives you an athlete's activities — runs, rides, and other workouts with GPS routes, distance, pace, time, elevation, and heart rate — plus profile and segment data. Authentication is OAuth 2.0 Authorization Code: you send the athlete to Strava to approve scopes, exchange the returned code for a short-lived access token, and call the v3 REST API with a Bearer token. Access tokens last about 6 hours and refresh tokens rotate on every refresh, so persist the newest one. Subscribe to the Events API webhook for near-real-time activity updates instead of polling.

## How to Integrate the Garmin API (2026)

- Question: how to integrate the Garmin API
- HTML: https://aifitnessapi.com/integrate/garmin-api
- Markdown: https://aifitnessapi.com/integrate/garmin-api.md
- Last reviewed: 2026-07-09

The Garmin API delivers deep wearable data: all-day wellness metrics (heart rate, steps, sleep, stress, Pulse Ox) through the Health API and per-activity data across 100-plus sports through the Activity API. It uses OAuth 2.0 with PKCE to obtain a per-user userAccessToken, and it pushes data to callback URLs you register instead of letting you poll. The big catch is access: the Connect Developer Program is partner-approval-only, not self-serve, and new sign-ups are reportedly on hold as of 2026, so the first real step is to apply and wait. Because Garmin's docs are gated, treat every host, scope, and endpoint as verify-against-current-partner-docs.

## How to Integrate the Oura API (2026)

- Question: how to integrate the Oura API
- HTML: https://aifitnessapi.com/integrate/oura-api
- Markdown: https://aifitnessapi.com/integrate/oura-api.md
- Last reviewed: 2026-07-09

The Oura API v2 gives you a connected user's sleep, activity, readiness, heart rate, workouts, and SpO2 as daily summaries and time series over a REST base at https://api.ouraring.com/v2/. Auth is OAuth 2.0 Authorization Code: you send the user to Oura's consent screen, exchange the returned code for an access token, then call usercollection endpoints with a Bearer token. Two constraints shape the build: Personal Access Tokens were deprecated in December 2025, so new integrations must use OAuth only, and a freshly registered app can connect at most 10 users until Oura approves it. Registration is otherwise self-serve, so you can start building immediately.

## How to Integrate the WHOOP API (2026)

- Question: how to integrate the WHOOP API
- HTML: https://aifitnessapi.com/integrate/whoop-api
- Markdown: https://aifitnessapi.com/integrate/whoop-api.md
- Last reviewed: 2026-07-09

The WHOOP API exposes a member's recovery, strain, sleep, and workout data through OAuth 2.0 consent, then REST pulls and webhooks against the api.prod.whoop.com base URL. You register an app in the WHOOP Developer Dashboard, run the authorization-code flow to get an access token for the scopes you need, and call the /v2 data endpoints with a Bearer token. Two access facts matter first: every user needs a paid WHOOP membership, and a new app is capped at 10 members until WHOOP approves it for production.

## How to Integrate Terra (Health-Data Aggregator) (2026)

- Question: how to integrate Terra
- HTML: https://aifitnessapi.com/integrate/terra-api
- Markdown: https://aifitnessapi.com/integrate/terra-api.md
- Last reviewed: 2026-07-09

Terra is a health-data aggregator: you integrate once and it returns normalized data from Garmin, Fitbit, Oura, Whoop, Strava, Apple Health, and hundreds of other sources behind a single schema. You authenticate to Terra with a dev-id and x-api-key header, then mint a hosted widget session from your backend so the user picks and authorizes their own provider through Terra's Connect flow. Terra runs each provider's OAuth for you and POSTs normalized data to one webhook, which you verify with an HMAC-SHA256 signature. The key caveat: for some providers (Garmin, Whoop, Strava, Oura) you must still register your own developer credentials and give them to Terra.

## How to Integrate the Nutritionix API (2026)

- Question: how to integrate the Nutritionix API
- HTML: https://aifitnessapi.com/integrate/nutritionix-api
- Markdown: https://aifitnessapi.com/integrate/nutritionix-api.md
- Last reviewed: 2026-07-09

The Nutritionix API returns nutrition data for foods: calories and macros for natural-language meals, autocomplete search across common and branded foods, and lookup by item ID or UPC barcode. Auth is a simple API-key pair, not OAuth: you create an application, get an App ID and App Key, and send both as static headers on every request. There is no token exchange, no callback, and nothing to refresh. The base URL is https://trackapi.nutritionix.com/v2/ and the main endpoint is POST /natural/nutrients.

## How to Integrate the ExerciseDB API (2026)

- Question: how to integrate ExerciseDB
- HTML: https://aifitnessapi.com/integrate/exercisedb-api
- Markdown: https://aifitnessapi.com/integrate/exercisedb-api.md
- Last reviewed: 2026-07-09

ExerciseDB provides a searchable exercise library where each entry includes a name, target muscle, body part, equipment, and an animated gifUrl demo. Auth is a simple API key: you subscribe on RapidAPI, then send your key plus the required host header on every request. Note the name is ambiguous, referring to both the commercial RapidAPI listing (host exercisedb.p.rapidapi.com) and the open-source, self-hostable exercisedb.dev project, which use different endpoint shapes. This guide covers the RapidAPI listing and points to the self-host option.

## How to Integrate the Polar API (2026)

- Question: how to integrate the Polar API
- HTML: https://aifitnessapi.com/integrate/polar-api
- Markdown: https://aifitnessapi.com/integrate/polar-api.md
- Last reviewed: 2026-08-12

Polar's cloud API is Open AccessLink v3, and registration is self-serve: you create an API client at the AccessLink admin portal with a Polar Flow account and receive a client ID and secret immediately, with no partner-approval gate. Authentication is an OAuth 2.0 authorization-code redirect through flow.polar.com, with the token exchange on a separate host authenticated by HTTP Basic; the authorization code is only valid for 10 minutes, and the response returns both an access token and a Polar user ID. One step is easy to miss: after authorization you must register the user with a POST to the users endpoint before any data is readable, and a 409 there simply means they are already registered. Exercises, activity summaries, and physical information are then pulled through transactions that discard the data once you commit them, and only data synced after linking is available, so poll regularly or lose history.
