Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CodeWithCJ/SparkyFitness/llms.txt

Use this file to discover all available pages before exploring further.

SparkyFitness connects to 8+ health platforms and devices to automatically pull your activity, workouts, sleep, and body metrics into your diary. OAuth-based services use standard authorization flows managed from Settings → External Data Sources, while mobile platforms sync through the native iOS and Android apps. You can also push data from any automation tool using the open /api/health-data REST endpoint.

Supported Integrations at a Glance

Garmin Connect

Steps, activities, sleep, heart rate, HRV, stress, nutrition, weight, and more via a dedicated microservice.

Fitbit

Steps, activities, sleep stages, weight, and body fat via the Fitbit Web API (deprecated September 2026).

Google Health

Activity, health metrics, sleep, and workouts via the Google Health API — the recommended Fitbit replacement.

Withings

Weight, body composition, blood pressure, heart rate, and sleep via Withings Health API.

Polar Flow

Workouts, weight, height, steps, and active calories via Polar AccessLink. (Partially tested)

Strava

Activities and workouts (distance, duration, calories, heart rate) plus athlete weight.

Hevy

Strength workouts with full set/rep/weight data from the Hevy app.

Apple Health (iOS)

Health and activity data via the SparkyFitness iOS app.

Health API Integrations (OAuth-based)

All OAuth integrations follow the same pattern: navigate to Settings → External Data Sources, find the provider, enter your credentials, and click Connect to begin the OAuth authorization flow. Once connected, you can trigger a manual sync or let the scheduled sync run automatically.

Garmin Connect

Garmin is the most comprehensive integration, pulling data across three sync phases:
PhaseData Synced
Health & WellnessSteps, resting heart rate, HRV, stress level, respiration rate, blood pressure, weight, body fat, muscle mass, bone mass, body water, sleep duration, hydration
Activities & WorkoutsAll Garmin activities with sport type, duration, calories, distance, GPS, and lap data
Nutrition DiaryCalorie and macro totals logged in Garmin Connect
Setup: Garmin Connect uses direct credential login (email + password) rather than a browser OAuth flow. Enter your Garmin Connect credentials in the External Data Sources form. MFA is supported — if prompted, enter your one-time code in the follow-up dialog.
Garmin sync runs as a separate microservice container (garmin-connect-service). You must enable this container in your deployment for Garmin to work. If the microservice is not running, all Garmin sync requests will fail with a connection error.

Fitbit

DataDetails
StepsDaily step count
ActivitiesExercise name, duration, calories, distance, average heart rate
SleepSessions with deep, light, REM, and awake stage breakdown; efficiency score
WeightBody weight (kg)
Body FatBody fat percentage
Setup: Register an application at dev.fitbit.com to obtain a Client ID and Client Secret. Paste them into the Fitbit entry in External Data Sources, then click Connect.
The Fitbit Web API is being deprecated in September 2026. Fitbit devices syncing to Google Health Connect will continue to work after that date via the Google Health integration.

Google Health

Google Health is the recommended long-term replacement for Fitbit and supports any device that syncs to Google Health Connect (Fitbit, Wear OS, Pixel Watch, and others).
CategoryData Synced
ActivitySteps, active zone minutes (fat burn / cardio / peak), activity minutes, distance, floors
Health MetricsResting heart rate, HRV, SpO2, respiratory rate, skin temperature, body fat %, VO2 Max, daily calories, weight
SleepSessions with light, deep, REM, and awake stage breakdown
ExerciseWorkouts logged in Google Health with duration and calories
Setup:
1

Create a Google Cloud project

Go to console.cloud.google.com and create a new project (or select an existing one).
2

Enable the Google Health API

Navigate to APIs & Services → Library, search for Google Health API, and click Enable.
3

Configure the OAuth consent screen

Go to APIs & Services → OAuth consent screen. Set User Type to External, fill in the required fields, and add all six required scopes (see below). Add your Google account as a test user, then Publish the app to prevent token revocation after 7 days.
4

Create OAuth 2.0 credentials

Go to APIs & Services → Credentials → Create Credentials → OAuth 2.0 Client ID. Set Application Type to Web application. Set the Authorized Redirect URI to the Callback URL shown in SparkyFitness under Settings → External Data Sources → Google Health → edit icon.
5

Connect in SparkyFitness

Paste your Client ID and Client Secret into the Google Health entry, click Save, then Connect, and complete the Google OAuth consent flow.
Required OAuth Scopes:
https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly
https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
https://www.googleapis.com/auth/googlehealth.sleep.readonly
https://www.googleapis.com/auth/googlehealth.location.readonly
https://www.googleapis.com/auth/googlehealth.profile.readonly
https://www.googleapis.com/auth/googlehealth.settings.readonly
The Google Health API limits session-based queries to approximately 30 days. SparkyFitness automatically splits longer date ranges into 30-day chunks, so a full year import works — it just takes a bit longer.

Withings

DataDetails
Body MeasurementsWeight, BMI, body fat %, muscle mass, bone mass, hydration, visceral fat
CardiovascularSystolic and diastolic blood pressure, heart rate
SleepTotal sleep duration, sleep score, deep / light / REM / awake stages
Setup: Go to account.withings.com/partner/add to register a developer application. Copy the Client ID and Client Secret into SparkyFitness, then click Connect.

Polar Flow

DataDetails
WorkoutsCardio training sessions with duration, calories, and sport type
Physical InfoWeight and height from your Polar profile
Daily ActivitySteps, active calories, and total calories as custom measurements
Setup: Visit the Polar AccessLink Admin portal and create a new client. Use the Callback URL shown in SparkyFitness as the redirect URI. Copy the Client ID and Client Secret into SparkyFitness, then click Connect.
Polar only delivers data uploaded after you authorize SparkyFitness. Historical workouts recorded before linking will not sync.

Strava

DataDetails
ActivitiesActivity name, sport type, distance (km), moving time, calories, average heart rate, elevation gain
Athlete WeightBody weight from your Strava athlete profile
Setup: Go to strava.com/settings/api and create an application to obtain a Client ID and Client Secret. Paste them into SparkyFitness and click Connect.
Strava integration is partially tested. If you encounter unexpected data, please share anonymized mock data with the community on Discord.

Hevy

Hevy uses an API Key (not OAuth) to authenticate. The integration syncs your full strength-training history, including every workout, exercise, set, rep count, and weight.
DataDetails
WorkoutsWorkout title, date, and total duration
ExercisesExercise name, sets with weight (kg), reps, set type (working, warm-up, drop set, failure)
Setup: In the Hevy app, go to Settings → API Key and copy your key. In SparkyFitness, add Hevy under External Data Sources and paste the API key.

Mobile Health Apps

Apple Health (iOS)

The SparkyFitness iOS app integrates with Apple Health to read health and activity data directly from your iPhone and Apple Watch. Data flows automatically when the app is installed and Health permissions are granted — no API credentials are required.

Google Health Connect (Android)

The SparkyFitness Android app integrates with Google Health Connect to read steps, activity, and health measurements from compatible Android devices. Grant the necessary Health Connect permissions inside the app to begin syncing.

Custom Integration: POST /api/health-data

Any automation tool — iOS Shortcuts, Android Tasker, Zapier, or your own scripts — can push health data to SparkyFitness using the health data REST endpoint.

Authentication

Generate a personal API key in Settings → Profile → Personal API Key, then include it in every request using one of these headers:
Authorization: Bearer <your-api-key>
X-Api-Key: <your-api-key>

Endpoint

POST /api/health-data
Accepts a single JSON object or an array of objects. Each object represents one data point.

Supported Data Types

type valueWhat it logsvalue format
weightBody weightNumber in kg
steps or stepDaily step countInteger
waterWater intakeInteger in ml
Active CaloriesActive calories burnedNumber in kcal
body_fat or body_fat_percentageBody fat percentageNumber (%)
heightBody heightNumber in cm
(any other string)Custom measurementNumber or string

Request Body

[
  {
    "type": "weight",
    "value": 82.5,
    "date": "2024-07-15"
  },
  {
    "type": "steps",
    "value": 9842,
    "date": "2024-07-15"
  },
  {
    "type": "water",
    "value": 1750,
    "date": "2024-07-15"
  },
  {
    "type": "Active Calories",
    "value": 420,
    "date": "2024-07-15"
  },
  {
    "type": "Blood Pressure Systolic",
    "value": 118,
    "date": "2024-07-15"
  }
]

Example: iOS Shortcut

POST https://your-sparky-instance.com/api/health-data
Authorization: Bearer spk_xxxxxxxxxxxxxxxxxxxx
Content-Type: application/json

{
  "type": "steps",
  "value": 7500,
  "date": "2024-07-15"
}
You can mix multiple types in a single request array. SparkyFitness processes each entry independently, so a partially valid payload still saves the valid entries.

Generating an API Key

1

Open Settings

Navigate to your profile icon and open Settings.
2

Find Personal API Key

Scroll to the Personal API Key section.
3

Generate key

Click Generate API Key. Copy the key immediately — it will not be shown again in full.

Build docs developers (and LLMs) love