garminconnect-js
Provides a typed client for Garmin Connect, enabling authentication and access to health, fitness, and activity data, including wellness, activities, training metrics, workouts, gear, courses, devices, badges, body composition, women's health, golf, nutrition, and training plans. Supports reading and writing Garmin Connect data, workout building, exercise catalogue validation, MFA login, and automatic token refresh.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Unofficial. Not affiliated with, endorsed by, or supported by Garmin. Garmin and Garmin Connect are trademarks of Garmin Ltd. or its subsidiaries.
A zero-dependency TypeScript client for Garmin Connect, for Node and Next.js server runtimes. It talks to the same undocumented endpoints the mobile app uses, with a fully typed, promise-based API.
It handles Garmin's undocumented SSO/OAuth flow, refreshes tokens for you, and gives you 212 typed methods over the endpoints the mobile app uses, plus two things that exist because Garmin's API is quietly hostile in specific places:
A fluent workout builder. Garmin's workout JSON has four traps that produce a silently wrong workout rather than an error: global
stepOrdernumbering that runs through repeat children, id/key triples that must agree, rests measured in a different field from times, and pace targets expressed as descending metres per second.buildWorkoutmakes all four unreachable (seeWORKOUTS.md).The exercise catalogue, type-checked. Garmin stores an unrecognised exercise name as an empty string and returns success, so a typo costs you the exercise and tells you nothing.
garminconnect-js/exercisesturns that into a compile error, with 1830 names verified one by one against a live account.
Behind both: a verification habit. Every method carries a live-verification status in
AGENTS.md, and a write is only "verified" once the stored value has been read back:
a 2xx on its own has twice hidden a real defect here.
Want a running app first? garminconnect-nextjs-starter
is a Next.js template that signs in (MFA included) and charts your sleep and HRV. Click
Use this template, and you're a npm run dev away from your own data. Or try the
live demo first.
If you're an AI coding agent (or configuring one), read AGENTS.md first: it's a
terser, higher-signal briefing than this README and calls out what does not exist here.
âšī¸ About
garminconnect-js fetches your health, fitness, and activity data from
connect.garmin.com so you can use it in your own Node or Next.js
server code, without scraping HTML or reverse-engineering the mobile app yourself.
It covers wellness, activities, training metrics, workouts, gear, courses, devices, badges, body
composition, women's health, golf, nutrition and training plans (see API coverage
for the breakdown). For anything it doesn't wrap, client.connectapi() calls any Garmin Connect
endpoint with the same auth.
Compatibility: requires Node.js 18+. This library is server-only (see Node runtime only below for why). It has no runtime dependencies and does not run in a browser or on an Edge runtime.
Status: 0.x, so the public API may still change between minor versions; breaking changes are
listed in CHANGELOG.md. The endpoints underneath are undocumented and belong to
Garmin, who can change them at any time. That is why every method carries a verification date
rather than an assurance.
Garmin Connect has no public, documented API. Everything here talks to the same endpoints connect.garmin.com and the Garmin Connect mobile app use, so Garmin can change or break any of it without notice. Don't build anything safety-critical on it, and expect to update when login stops working.
Known limitation: EU upload consent (412)
Garmin returns 412 PreconditionFailedException: "The user is from EU location, but upload consent is not yet granted or revoked" for every write (addWeighIn, importActivity,
createManualActivity, workout uploads, gear writes: all of them) on an EU-region account that
has not clicked through Garmin Connect's upload-consent flow. This was hit live during this
project's own development. It is an account-state precondition, not a library bug: the request
shape and URL are correct, and Garmin's server is refusing the write until the account owner
grants consent in Garmin Connect's own settings UI. No method in this library wraps Garmin's
consent-status check, but you can read it directly:
// Response shape below is LIVE-OBSERVED, not assumed. There is no `enabled` field:
// the signal is `userOption`, which reads "opt-in" once consent has been granted.
const consent = await client.connectapi<{ userOption?: string }>(
"/gdprconsent-service/feature/UPLOAD",
);
const uploadConsentGranted = consent?.userOption === "opt-in";If your first write against an EU account 412s, check this before assuming your request is wrong.
Related MCP server: garmin-mcp
đĻ Installation & setup
npm install garminconnect-jsimport { GarminClient, Garmin, FileTokenStore } from "garminconnect-js";
const client = new GarminClient({ tokenStore: new FileTokenStore("./tokens") });
const result = await client.login(process.env.GARMIN_EMAIL!, process.env.GARMIN_PASSWORD!);
if (result.state === "mfa_required") {
// login() does not throw or block on MFA; finish it with the code Garmin sent.
await client.resumeLogin(result.mfaState, await promptForCode());
}
const garmin = new Garmin(client);
console.log(await garmin.getUserProfile());(promptForCode is yours to supply: stdin in a script, a second HTTP request in a web app; see
MFA across two HTTP requests.) Tokens are now in ./tokens, so a
later process skips the password entirely:
const client = new GarminClient({ tokenStore: new FileTokenStore("./tokens") });
if (!(await client.loadTokens())) throw new Error("Not connected to Garmin: log in first");
const garmin = new Garmin(client);loadTokens() returns false rather than throwing when the store is empty.
Client options
new GarminClient(options?) accepts:
Option | Default | What it does |
|
| Where tokens are loaded from and saved to. See Authentication. |
|
|
|
|
| Per-request timeout for ordinary JSON calls. |
|
| Retries after the first attempt, on a network error or a 408/500/502/503/504. POST is never retried, so a write cannot be duplicated. |
|
| Base delay between retries, doubling each attempt (500, 1000, 2000 ms). |
|
| Swap in your own |
| random 3000â8000 | Pause before the SSO widget's credential POST, used only when the mobile login is rate limited (see Authentication). Set |
đ Authentication
Login follows Garmin's SSO flow: GarminClient.login(email, password) exchanges credentials for an OAuth1 token, then exchanges
that for a short-lived OAuth2 access token. Both are handed to your TokenStore.
Rate-limited sign-in. Garmin rate limits the mobile sign-in route, per client id and source IP, often after one or two sign-ins. When the mobile sign-in page or
/mobile/api/loginanswers HTTP 429, or/mobile/api/loginreports a 429 inside a 200 JSON reply,login()signs in once more through Garmin's SSO web widget (/sso/embed+/sso/signin), which sends no client id, and returns the same tokens. If the widget is rate limited too,GarminRateLimitErrornames the widget URL; other widget failures start withMobile login rate limited;, and a rejected password keeps itsSSO error:prefix. Tokens refresh for about 30 days without signing in, so keep them in aTokenStorerather than signing in again.Where tokens are stored: wherever your
TokenStoreputs them.FileTokenStorewritesoauth1_token.jsonandoauth2_token.jsonto a directory you choose (./tokensin the examples above), using garth's on-disk format, so tokens produced by Pythongarthload here unchanged. For serverless, implement the same three-method interface against your own database or cache; seeTokenStoreexample below.Auto-refresh: the OAuth2 access token refreshes automatically, using the OAuth1 token (not an OAuth2 refresh token; Garmin's flow doesn't have one), before it expires. You never call refresh yourself;
connectapi()calls do it transparently and persist the refreshed token back to your store.Observed lifetimes: OAuth2 access tokens have lasted roughly 27 hours, and the OAuth1 token about 30 days. In practice a session keeps rolling forward as long as you use it (call any method) at least once every 30 days. Beyond that window,
GarminAuthErroris thrown and you need to log in again.Cached tokens: once tokens exist in your store,
client.loadTokens()reads them back and no further password prompt is needed until the refresh window above lapses.A third-party request at login. The OAuth consumer key and secret are not bundled; like
garth, the library fetches them fromhttps://thegarth.s3.amazonaws.com/oauth_consumer.json, a bucket run by garth's author. That happens once per process, on the first login or token refresh, and the result is cached. If that URL is unreachable (an outage, or a server whose egress is firewalled), login and refresh fail with aGarminConnectionError. Allow-list it if you restrict outbound traffic.
MFA across two HTTP requests
login() returns { state: "mfa_required", mfaState } instead of throwing. mfaState is plain
JSON with no password in it, so it survives a round trip through a session store. That is
what makes MFA work on serverless, where the code arrives in a different request than the one
that started the login:
// app/api/garmin/login/route.ts
export const runtime = "nodejs";
export async function POST(req: Request) {
const { email, password } = await req.json();
const client = new GarminClient({ tokenStore: myStore });
const result = await client.login(email, password);
if (result.state === "mfa_required") {
await session.set("garminMfa", result.mfaState); // encrypted session
return Response.json({ mfaRequired: true, method: result.mfaState.mfaMethod });
}
return Response.json({ mfaRequired: false });
}
// app/api/garmin/mfa/route.ts
export const runtime = "nodejs";
export async function POST(req: Request) {
const { code } = await req.json();
const mfaState = await session.get("garminMfa");
const client = new GarminClient({ tokenStore: myStore });
await client.resumeLogin(mfaState, code);
await session.delete("garminMfa");
return Response.json({ ok: true });
}Treat mfaState as a short-lived secret: mfaState.cookies is a live, partially authenticated
SSO session, so anyone holding it can finish the login with the code. Encrypt it at rest, scope it
to the session that started the login, and delete it once used. The MFA path is exercised live by
npm run login (see See it run) as well as unit-tested.
mfaState.flow says which sign-in route produced it: "mobile" (the default; states saved by
0.1.0 or 0.2.0 have no flow and count as mobile) or "widget". A widget state also holds the
page's CSRF token and form parameters. Pass either kind straight back to resumeLogin; read
loginParams only after checking flow !== "widget".
đģ Code examples
Node runtime only
This library uses node:crypto and Buffer. It does not run on the Edge runtime. In a Next.js
route handler:
export const runtime = "nodejs";Never import it into a Client Component: credentials and tokens must stay on the server.
Reading data
// lib/garmin.ts
import { GarminClient, Garmin } from "garminconnect-js";
export async function getGarmin() {
const client = new GarminClient({ tokenStore: myStore });
if (!(await client.loadTokens())) throw new Error("Not connected to Garmin");
return new Garmin(client);
}
// app/api/sleep/route.ts
export const runtime = "nodejs";
export async function GET(req: Request) {
const date = new URL(req.url).searchParams.get("date")!;
const garmin = await getGarmin();
return Response.json(await garmin.getSleepData(date));
}Garmin caches the resolved user profile (and user settings) for the lifetime of the instance.
getGarmin() above builds a fresh Garmin per request, which is fine for a single call, but any
date-scoped method (getSleepData, getStepsData, ...) resolves displayName first, so a new
Garmin per request costs an extra socialProfile fetch on every call. If a request handler
makes several Garmin calls, or you're calling from a long-lived process (a cron job, a worker),
hoist and reuse one Garmin instance instead of building a new one per call.
Dates are interpreted as UTC calendar dates, not local ones. Passing a Date object (instead
of a "YYYY-MM-DD" string) is formatted with toISOString().slice(0, 10), so a caller in a
negative UTC-offset timezone (e.g. US Pacific) who calls new Date() late in their local day can
get tomorrow's date, because it's already tomorrow in UTC. Pass an explicit "YYYY-MM-DD" string
when you need the calendar date in the user's own timezone.
getSleepData returns SleepData | null (and so does getHrvData) rather than throwing when
Garmin has no data for the requested date. Check for null before using the result.
Bring your own token storage
FileTokenStore suits scripts and a single long-lived server. On serverless, implement the
three-method interface against whatever you already run:
import type { TokenStore, Tokens } from "garminconnect-js";
// `Redis` here is illustrative; bring your own client's type
// (e.g. `import type { Redis } from "ioredis";`).
type Redis = { get(key: string): Promise<string | null>; set(key: string, value: string): Promise<unknown>; del(key: string): Promise<unknown> };
export class RedisTokenStore implements TokenStore {
constructor(private redis: Redis, private userId: string) {}
async load(): Promise<Tokens | null> {
const raw = await this.redis.get(`garmin:${this.userId}`);
return raw ? (JSON.parse(raw) as Tokens) : null;
}
async save(tokens: Tokens): Promise<void> {
await this.redis.set(`garmin:${this.userId}`, JSON.stringify(tokens));
}
async clear(): Promise<void> {
await this.redis.del(`garmin:${this.userId}`);
}
}Persist the whole Tokens object, and keep expires_at and refresh_token_expires_at
as numbers. Every refresh decision reads them. Storing the whole JSON blob, as above, keeps
them; a database schema or a field allowlist that drops them does not, and the client then treats
the token as expired (it fails closed) and refreshes on every call. Round-trip your store once in
a test and assert both numbers survive.
Uploading an activity file
import { readFile } from "node:fs/promises";
const file = new Blob([await readFile("ride.fit")]);
// As an import (the extension picks the endpoint, and must be .fit, .gpx or .tcx):
const imported = await garmin.importActivity(file, "ride.fit");
// Or as an ordinary device-sync-shaped upload:
await garmin.uploadActivity(file, "ride.fit");Both are live-verified: a synthetic GPX was uploaded, found by polling getActivities once Garmin
finished processing it asynchronously (a few seconds to ~20s), then deleted. A duplicate file
makes importActivity throw a GarminConnectionError ("Activity already exists"). The two hit
different endpoints with different headers; see AGENTS.md section 6 before
swapping one for the other.
Both are built on client.upload(file, filename, path?, options?), which you can call directly
for an endpoint no method wraps. It posts multipart form data (field name file) to path
(default /upload-service/upload) with a 60s default timeout:
await client.upload(file, "ride.fit", "/upload-service/upload", { timeoutMs: 120_000 });Courses
A course is a saved route you can send to a device and follow. Creating one from a GPX file is two
steps inside Garmin (parse, then save), and createCourseFromGpx does both:
const course = await garmin.createCourseFromGpx(new Blob([gpxText]), "loop.gpx", {
name: "Sunday loop",
activityTypeId: 10, // a Garmin activity-type id; the default, 1, is running
privacy: "private",
});
await garmin.updateCourse(course!.courseId!, { name: "Sunday long loop", privacy: "public" });
const gpx = await garmin.downloadCourseGpx(course!.courseId!);Right after creation Garmin is still processing the course, and an update or delete can fail with
a 429 "not yet ready": a GarminRateLimitError, though it is not rate limiting. Retry after a few
seconds.
Errors
Error | Meaning |
| Base class for everything below; also thrown directly for malformed responses. |
| 401/403, failed SSO, or expired tokens. Log in again. |
| 429. Carries |
| Network failure or timeout (after retries), and a few semantic HTTP statuses that some services deliberately re-raise as this class: every HTTP error from |
| Any other non-2xx. Carries |
| The account has no Garmin Connect+, which this method needs (food logging). Carries |
đ Building workouts
Creating a Garmin workout by hand means writing deeply nested JSON with several non-obvious rules:
step numbering that runs across repeat blocks, enum references that must agree in three places, and
pace targets expressed as descending metres-per-second. buildWorkout handles all of that:
import { buildWorkout } from "garminconnect-js";
const workout = buildWorkout("4 x 1 km", { sport: "running" })
.warmup({ time: 600, target: { heartRateZone: 2 } })
.repeat(4, (set) =>
set
.interval({
distance: 1000,
target: { pace: { minPerKm: [4.5, 5] } },
secondaryTarget: { cadence: [176, 184] },
})
.recovery({ time: 120 }),
)
.cooldown({ lapButton: true })
.build();
await garmin.uploadWorkout(workout);It covers all twelve sports, every step and end-condition type, primary and secondary targets,
nested and time-boxed repeats, swim strokes/drills/equipment, strength exercises and weights, and
multi-sport bricks. uploadWorkout still accepts raw JSON, so the builder is optional.
For strength work, Garmin accepts an unknown exercise name and silently stores it as an empty
string: no error, just a step with no exercise. So the builder type-checks it: once you pick a
category, name autocompletes to that category's names, and anything else is a compile error.
All 1830 names were verified one by one against a live account:
.interval({ reps: 8, exercise: { category: "SQUAT", name: "BARBELL_BACK_SQUAT" }, weightKg: 60 })The catalogue itself is a separate entry point, garminconnect-js/exercises, so its data never
reaches the root bundle. Import it when you need the list or a runtime check:
import { EXERCISES, exercise, isExerciseName } from "garminconnect-js/exercises";
EXERCISES.SQUAT; // all 106 squat names, e.g. for a picker
exercise("SQUAT", "BARBELL_BACK_SQUAT"); // the same compile-time check, as a helper
isExerciseName("SQUAT", nameFromYourDatabase); // for names that are only strings at runtimeâ WORKOUTS.md is the full guide, with a worked example for every sport and a
reference for every option. Runnable versions of those examples live in
examples/workout-gallery.ts.
đ¤ Use it from Claude
@dynamicsninja/garminconnect-mcp puts this library behind an MCP server, so you can ask Claude
Desktop to build a workout, schedule it and send it to your watch, or to read your sleep and
training data. It ships from this repo, in lockstep with the library.
Or use it without installing anything: add https://garmin.ficdev.xyz/mcp as a custom connector in claude.ai (see mcp/README.md).
đ API coverage
202 typed methods across 13 categories. Each category links to a generated
docs/api/ page with every method's signature, a call you can paste, and
its live-verification status (confirmed against a real Garmin account, not merely unit-tested).
Category | Methods | Verified live | Covers |
36 | all | steps, heart rate, sleep (and moving the sleep window), HRV, stress, SpO2, respiration, hydration, blood pressure, body battery, whole-day summaries | |
39 | all | list/filtered search/detail, splits, weather, workouts done, manual creation, import/upload, exercise sets, gear links, personal records, event type, RPE, feel and distance | |
18 | all | training status, race predictions, FTP, lactate threshold, HR/power zones (and setting HR zones), endurance and hill score | |
19 | all | CRUD, per-sport upload, scheduling, schedule summaries, training-plan and Garmin Coach workouts, device push | |
6 | all | CRUD, activity defaults, stats | |
8 | all | import a GPX, create, rename, privacy, export as GPX, delete | |
6 | all | races and other events: list, read, create, update, delete; races from Garmin's catalogue | |
6 | all | devices, settings, alarms, solar, last used | |
9 | all | earned/available badges, badge detail, challenges | |
9 | 8 of 9 | weigh-ins, weight goals, body composition (FIT upload) | |
11 | all | menstrual cycle, pregnancy | |
5 | 3 of 5 | summary, scorecards, shots, clubs, stats | |
10 | all | read-only logs, tags, numbering, certifications, equipment and privacy settings | |
30 | allš | profile, settings, goals, nutrition and food logging², training plans, GraphQL, logout |
š logout() makes no HTTP call, so there is nothing to verify against Garmin.
² Food logging (search, custom foods, logging, deleting) needs Garmin Connect+, which needs a paired Garmin device; verified on such an account. garmin.hasConnectPlus() tells you up front, CONNECT_PLUS_METHODS lists the methods, and without it they throw GarminConnectPlusRequiredError.
Still unverified: getGolfScorecard and getGolfShotData, because no available account has a
recorded round. getGolfShotData also returns an unexplained 410 against a made-up id, and one
real scorecard would show whether Garmin has retired that endpoint. getWeightGoals is partial:
it answers on both accounts, but neither has a weight goal, so only the empty response is confirmed.
Worth knowing before you call:
addHydrationDatais permanent: Garmin has no delete for it.The badge-challenge endpoints reject
start=0server-side; passstart >= 1.Women's-health writes need cycle-tracking settings that only Garmin's own first-run wizard creates. Run it once in the web UI first.
getActivity(id)is not shaped like a list row: distance, duration and the rest are undersummaryDTO, the type underactivityTypeDTO.searchActivitiesreturns an empty list, not an error, for an unknownsortByorrequiredFieldsname (Garmin's names, not always the response's:averageHRis unknown).Many response types are filled in from Garmin's official Personal API spec, also exported on their own as the
PersonalApitype namespace. Every field there is optional: Garmin leaves out what does not apply.
The per-method gotchas and the evidence behind every verification are in AGENTS.md
section 3.
The standing rule behind all of this: a live write probe only runs when the value can be read back and the change undone, and a 2xx is never accepted as evidence on its own.
đ ī¸ Development setup
git clone https://github.com/DynamicsNinja/garminconnect-js.git
cd garminconnect-js
npm installCommand | What it does |
| Typecheck, lint, build and test, in that order: what CI and |
| Bundles |
|
|
| ESLint over |
| Prettier, writing in place. |
| Runs the unit/integration suite against mocked HTTP (see Testing). |
| Same, in watch mode. |
| Runs the live suite against the real Garmin API; requires |
| Regenerates |
| One-time interactive login; writes tokens to |
| Runs |
| Refreshes the scrubbed fixtures under |
| Live read probes against the test account, by category ( |
| Live write probes: create, read back, delete. |
| Builds, uploads, reads back and deletes a workout for each of the twelve sports. |
| The builder's full option cross-product for swim, bike and run, compared field by field on read-back. |
| Verifies candidate exercise names by upload and read-back, keeping only those Garmin echoes back. |
| Login to, and read-only probe of, a real personal account, on a transport that refuses any non-GET. Uses its own |
| Read-only, real account: calls every path in Garmin's Personal API spec on our host and diffs the field names against the spec. Fetches the spec from developer.garmin.com. |
| Regenerates |
The four write commands (smoke:write, smoke:gaps, smoke:builder, smoke:matrix) and
verify:exercises refuse to run unless the logged-in profile matches GARMIN_TEST_PROFILE_ID:
they are for a disposable test account, never a real one. smoke:real has the inverse gate: it
refuses if the profile DOES match.
Release: npm run bump -- X.Y.Z bumps the library and @dynamicsninja/garminconnect-mcp together; pushing tag
vX.Y.Z publishes both.
Credentials from a .env file: the dev scripts (npm run login, npm run demo,
npm run record) load GARMIN_EMAIL and GARMIN_PASSWORD from a .env file in the repo root,
if one exists, so credentials stay out of shell history. npm run login:real reads
GARMIN_REAL_EMAIL/GARMIN_REAL_PASSWORD instead, so both accounts can share one .env. Real
environment variables take precedence, and .env is gitignored.
What running it locally does
npm run login and npm run demo talk to the real connectapi.garmin.com /
sso.garmin.com endpoints using your real Garmin credentials and your real account data.
Concretely:
npm run loginsends your email and password to Garmin's SSO service over HTTPS, the same request the mobile app makes, and writes real OAuth tokens to./tokens(gitignored).npm run demoandnpm run recordthen use those tokens to fetch your own steps, heart rate, sleep, HRV, activities, and body-composition history.npm run demo's "Export all to JSON" option writes a file under./export/(gitignored) that has been passed through the samescrub()helper the test fixtures use. But scrubbing redacts by field name, not by content, so free-text fields (activity titles, notes) are not scanned. Treat any export as containing real personal data.None of your data leaves your machine except in requests to Garmin's own servers. The only other request is the OAuth consumer-key fetch described under Authentication, which carries no account data.
đ See it run
Two files show it working end to end:
scripts/login.ts: one-time interactive login. Prompts for an MFA code on stdin if Garmin asks for one, then writes tokens to./tokens.examples/demo.ts: an interactive, numbered-menu demo (npm run demo) that loads those tokens and walks through the categories this library implements: profile, daily health, activities, body composition, and a JSON export.
$ npm run login
MFA code (sent via email):
Tokens written to ./tokens
$ npm run demo
garminconnect-js demo
=====================
1) User & Profile
2) Daily Health
3) Activities
4) Body Composition
5) Export all to JSON
0) Exit
> 1
--- User & Profile ---
Display name : jdoe-display
Full name : Jamie Doe
Profile ID : 1234567
Unit system : metric
garminconnect-js demo
=====================
1) User & Profile
2) Daily Health
3) Activities
4) Body Composition
5) Export all to JSON
0) Exit
> 2
--- Daily Health (2026-09-21) ---
Steps: 8742 Distance: 6.3 km Active kcal: 512
Resting HR: 58 bpm Min/Max: 54/142 bpm
Sleep data: available
HRV: available
Body Battery entries: 24
garminconnect-js demo
=====================
1) User & Profile
2) Daily Health
3) Activities
4) Body Composition
5) Export all to JSON
0) Exit
> 0
Goodbye.(Numbers above are synthetic: a demo fixture, not a real account.)
â Testing
npm test911 tests across 61 files, all against mocked HTTP (via msw): no network access and no
credentials required. Covers auth/SSO/MFA, token storage and refresh, the HTTP fetcher's retry
and error handling, every service method, and the public build output.
npm run test:liveRuns a separate suite against the real Garmin API. Requires tokens from npm run login and is
not part of CI; run it locally when you want to confirm live behavior.
Testing your own code against this library: mock at the fetch layer rather than stubbing
Garmin methods. Pass a mock (or an msw handler) as GarminClientOptions.fetchImpl, and the
real request construction, auth headers, retries and response parsing all still run.
đ¤ Contributing
Before opening a PR:
npm run checkpasses: typecheck, lint, build and tests, in CI's exact order. CI runs this same script, so a green local run cannot diverge from a green pipeline by omission.npm run docs:apihas been re-run if you changed a method or itsAGENTS.mdrow, and the regenerateddocs/api/files are committed. A test fails if they are stale.New endpoints follow the existing
services/*+Garminmethod pattern, with a typed response interface intypes/.Commits follow Conventional Commits.
No real credentials, tokens, personal names, emails, or GPS coordinates in anything committed. Recorded fixtures must go through
scrub()and be manually inspected before staging, per the remindernpm run recordprints.If you're changing what's implemented, update the API coverage table above rather than leaving it stale.
Note anything user-visible in
CHANGELOG.md.
Security issues go through SECURITY.md, privately, not a public issue: this
library holds live Garmin credentials on people's behalf.
â Support
If this library saves you time, you can support its development:
đ Additional resources & acknowledgements
connect.garmin.com: the service this library talks to.
CHANGELOG.md: what changed in each release.The SSO/OAuth flow was originally derived from garth and python-garminconnect; attribution is in
NOTICE.
License
MIT. See NOTICE for third-party attribution.
Available Tools
209 toolsadd_body_compositionBInspect
Records a weight (kg) with optional body-composition fields such as body fat and muscle mass, uploaded as a .fit weight-scale file built in memory. Builds a .fit binary in memory and uploads it via client.upload to /upload-service/upload; weight validated positive/finite, throws GarminError otherwise.
Inputs: weight (required), extra.
add_gear_to_activityBInspect
Links a piece of gear to an activity. On 404 re-raises as GarminConnectionError ("gear not found (likely retired/removed)").
Inputs: gearUUID (required), activityId (required).
add_hydration_dataAInspect
Logs water intake in milliliters (negative values subtract). There is no delete endpoint. Raw milliliters, magnitude capped at 10000, negative values allowed; no delete endpoint exists, so not safely round-trippable.
Inputs: valueInMl (required), when, cdate.
add_weigh_inBInspect
Records a weigh-in in "kg" (the default) or "lbs". when defaults to now. Defaults unitKey="kg", when=new Date().
Inputs: weightValue (required), when, unitKey.
add_weigh_in_with_timestampsAInspect
addWeighIn with explicit local and GMT timestamps. Same raw-value, no-conversion rule as addWeighIn; the two timestamps are COUPLED: the local instant resolves from dateTimestamp if given (naive strings read as LOCAL time) else from when (defaults new Date()), and gmtTimestamp, when omitted, is derived from THAT resolved instant, never independently from when. Both supplied strings are re-formatted rather than forwarded verbatim (a naive gmtTimestamp is read as UTC).
Inputs: weightValue (required), when, unitKey, gmtTimestamp, +1 more.
confirm_menstrual_period_startAInspect
Confirms that a period started on a date, with its period and cycle lengths. There is no undo. Needs cycle tracking set up in Garmin Connect first. POSTs /periodichealth-service/menstrualcycle/{periodStartDate} directly, NOT the dayview/calendar/lastconfirmed/summary sub-paths.
Inputs: cycleLength (required), periodLength (required), periodStartDate (required), options.
count_activitiesARead-onlyInspect
The total number of activities on the account. Returns the envelope's totalCount, not the whole response; throws GarminError if Garmin returns nothing or a non-numeric totalCount.
Inputs: no named parameters.
create_calendar_eventAInspect
Adds a race or other event to the calendar. Always stored PRIVATE. POSTs /calendar-service/event. CalendarEventInput = {name, date, startTime?: "HH:MM", timeZoneId?, eventType?, race?, primary?, distance?: {value, unit: meter|kilometer|yard|mile}, goalTimeSeconds?, location?, url?, note?}; only name/date are required by Garmin ('addEvent.arg3.eventName' must not be blank otherwise). Garmin forces every user-created event PRIVATE and unshareable whatever is sent, sets isTrainingEvent whenever isPrimaryEvent is, and answers an unknown eventType with a 500. It also rewrote âĻ
Inputs: input (required).
create_courseAInspect
Saves a course from a name and at least two geo points. Garmin computes the distance. POSTs /course-service/course with the template Garmin's web client sends. CourseInput = { name, geoPoints, coursePoints?, activityTypeId? = 1 (running), privacy? = "private" }; privacy maps to rulePK public 1 / private 2. Garmin computes distanceMeter and elevation. Throws GarminError before any request on an empty name or fewer than two geoPoints.
Inputs: input (required).
create_course_from_gpxBInspect
importCourseGpx then createCourse, in one call. Name defaults to the GPX <name>, then the filename without .gpx.
Inputs: filePath (required), options.
create_custom_foodAInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Creates a custom food (per serving). Needs Connect+. A PUT, not a POST, to /nutrition-service/customFood; CustomFoodInput = {name, calories, servingUnit? = "G", servingSize? = 100, brand?, carbs?, protein?, fat?, fiber?, sugar?, saturatedFat?, transFat?, sodium?, cholesterol?, potassium?, calcium?, iron?, vitaminD?} per ONE serving, absolute amounts (not %DV); numbers are sent as strings, as Garmin's own client does. Returns the stored food with the foodId/servingId logFood takes.
Inputs: input (required).
create_gearAInspect
Creates a piece of gear (shoes, bike and so on). Usage limits are given in km and minutes. POSTs /gear-service/gear/v2; defaults usageType="DISTANCE", notes=""; gearType/usageType upper-cased via validateSportKey; converts maxUsageDistanceKm -> maxUsageDistanceMeters (round(km*1000), floor 1) and maxUsageDurationMin -> maxUsageDurationSeconds (round(min*60), floor 1), the opposite direction from addWeighIn's "send raw" rule; returns the response unchecked.
Inputs: name (required), brand (required), model (required), gearType (required), +6 more.
create_manual_activityBInspect
Creates a manual activity from a distance in km and a duration in minutes. startDatetime is a local timestamp with milliseconds, e.g. "2026-09-22T10:00:00.000". converts units: distanceKm * 1000 â meters, durationMin * 60 â seconds, before building the request body; startDatetime is NOT routed through formatDate (it's a full local timestamp, not a bare calendar date) and must include milliseconds, e.g. "2026-09-22T10:00:00.000"; omitting them produced a live HTTP 500 ValueInstantiationException from Garmin during verification.
Inputs: typeKey (required), timeZone (required), distanceKm (required), durationMin (required), +2 more.
create_manual_activity_from_jsonAInspect
Creates a manual activity from a payload sent to Garmin verbatim. Sends payload to Garmin verbatim, no shape validation.
Inputs: payload (required).
create_workoutAInspect
Save a workout to the user's Garmin Connect workout library. Only after the user has confirmed a preview_workout of the same spec. Look exercise names up with search_exercises first; an unknown name is rejected. Afterwards, schedule_workout (if available) puts it on the calendar and push_workout_to_device (if available) sends it to the watch. Paces are minutes as decimals (4:30 = 4.5), distances metres, times seconds.
Inputs: spec (required).
delete_activityADestructiveInspect
Deletes an activity. IRREVERSIBLE. Resolves to null on success. IRREVERSIBLE: confirm with the user before calling.
Inputs: activityId (required).
delete_blood_pressureADestructiveInspect
Deletes one blood-pressure reading by its version, taken from getBloodPressure. Deletes one reading by its version, taken from getBloodPressure. IRREVERSIBLE: confirm with the user before calling.
Inputs: cdate (required), version (required).
delete_calendar_eventADestructiveInspect
IRREVERSIBLE. DELETE /calendar-service/event/{id}, resolves null (204). IRREVERSIBLE: confirm with the user before calling.
Inputs: eventId (required).
delete_courseADestructiveInspect
IRREVERSIBLE. A course created seconds ago may 429 "not yet ready"; retry shortly. DELETE /course-service/course/{courseId}, resolves null (204). May 429 "not yet ready" for a few seconds after creation. IRREVERSIBLE: confirm with the user before calling.
Inputs: courseId (required).
delete_custom_foodADestructiveInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). IRREVERSIBLE. Needs Connect+. DELETE /nutrition-service/customFood/{foodId}, resolves null. IRREVERSIBLE: confirm with the user before calling.
Inputs: foodId (required).
delete_food_logsADestructiveInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Deletes log entries from one day, any number at once. IRREVERSIBLE. DELETE /nutrition-service/food/logs/{date} with {logIds} as the body: any number in ONE call, regular and quick-add alike. logIds are on the entries of getNutritionDailyFoodLog. Needs Connect+. IRREVERSIBLE: confirm with the user before calling.
Inputs: date (required), logIds (required).
delete_gearADestructiveInspect
Deletes a piece of gear and its activity history. IRREVERSIBLE. DELETE /gear-service/gear/v2/{gearUUID}, resolves null on success (204). The UUID must be HYPHENATED: getGear returns them WITHOUT hyphens and that form 404s, so this method re-inserts them for you when handed the bare 32-char form; only hand-rolled URLs hit the 404. IRREVERSIBLE: confirm with the user before calling.
Inputs: gearUUID (required).
delete_heart_rate_zonesADestructiveInspect
Removes a sport's own zone profile; it falls back to DEFAULT. PUTs the stored profile back with changeState: "DELETED", which removes it so the sport falls back to DEFAULT. Refuses DEFAULT; throws for a sport with no profile instead of doing nothing. IRREVERSIBLE: confirm with the user before calling.
Inputs: sport (required).
delete_training_planADestructiveInspect
Quits an enrolled plan ("Quit Plan"); its workouts leave the calendar. IRREVERSIBLE. DELETE /trainingplan-service/trainingplan/trainingplan/{planId} (the trainingplan segment really is doubled): the request Garmin Connect's "Quit Plan" sends, observed in the web client on 2026-10-06. Resolves null (204); the plan's scheduled workouts leave the calendar, completed activities stay. A second call is a 404 "Training plan not found with ID: âĻ". IRREVERSIBLE: confirm with the user before calling.
Inputs: planId (required).
delete_weigh_inADestructiveInspect
Deletes one weigh-in, by date and its weightPk. IRREVERSIBLE: confirm with the user before calling.
Inputs: cdate (required), weightPk (required).
delete_weigh_insADestructiveInspect
Deletes the weigh-ins recorded on one date and returns how many went. IRREVERSIBLE. No HTTP path of its own: calls getDailyWeighIns, then loops deleteWeighIn per entry; returns null (deletes nothing) if there are zero entries, or more than one entry and deleteAll is not true; otherwise deletes every entry that day and returns the count. IRREVERSIBLE: confirm with the user before calling.
Inputs: cdate (required), deleteAll.
delete_workoutADestructiveInspect
Deletes a workout from the library. IRREVERSIBLE. IRREVERSIBLE: confirm with the user before calling.
Inputs: workoutId (required).
display_nameARead-onlyInspect
The account's display name, which date-scoped endpoints put in their URLs. Cached.
Inputs: no named parameters.
download_activityBRead-onlyInspect
Downloads an activity file: "ORIGINAL" (the default), TCX, GPX, KML or CSV. ActivityDownloadFormat is "ORIGINAL" | "TCX" | "GPX" | "KML" | "CSV", default "ORIGINAL".
Inputs: activityId (required), format.
download_course_gpxBRead-onlyInspect
Downloads a saved course as GPX bytes. GETs /course-service/course/gpx/{courseId} through client.download.
Inputs: courseId (required).
download_health_snapshotBRead-onlyInspect
Downloads the Health Snapshot recorded on a date, as raw bytes.
Inputs: requestedDate (required).
download_workoutBRead-onlyInspect
Downloads a workout as FIT-file bytes.
Inputs: workoutId (required).
full_nameARead-onlyInspect
The account holder's full name, from the cached user profile.
Inputs: no named parameters.
get_activitiesCRead-onlyInspect
A page of activities, newest first (start defaults to 0, limit to 20). Defaults start=0, limit=20.
Inputs: limit, start.
get_activities_by_dateBRead-onlyInspect
Every activity between two dates, optionally filtered by activity type. Pages through the results internally. Paginates internally: fetches fixed pages of 20, incrementing start by 20, until an empty page (normal end) or 2000 pages without one (throws GarminError).
Inputs: startdate (required), enddate, sortorder, activitytype.
get_activities_for_dateBRead-onlyInspect
The activities recorded on one date. Despite the name, the path is /mobile-gateway/heartRate/..., not an activities-service path.
Inputs: fordate (required).
get_activityBRead-onlyInspect
One activity by id; measurements are under summaryDTO. Throws GarminError if Garmin returns nothing. ActivitySummary extends PersonalApi.ActivitySummaryDTO, typed from Garmin's Personal API spec (AGENTS.md section 3).
Inputs: activityId (required).
get_activity_detailsBRead-onlyInspect
An activity's time series and GPS track, capped at maxchart/maxpoly points. Defaults maxchart=2000, maxpoly=4000, sent as maxChartSize/maxPolylineSize.
Inputs: activityId (required), maxpoly, maxchart.
get_activity_event_typesARead-onlyInspect
The event types setActivityEventType accepts. GETs /activity-service/activity/eventTypes: nine {typeId, typeKey, sortOrder} entries (race, recreation, specialEvent, training, transportation, touring, geocaching, fitness, uncategorized).
Inputs: no named parameters.
get_activity_exercise_setsCRead-onlyInspect
A strength activity's exercise sets.
Inputs: activityId (required).
get_activity_gearBRead-onlyInspect
The gear linked to an activity. Returns an ARRAY, verified live.
Inputs: activityId (required).
get_activity_hr_in_timezonesBRead-onlyInspect
Time spent in each heart-rate zone during an activity.
Inputs: activityId (required).
get_activity_power_in_timezonesBRead-onlyInspect
Time spent in each power zone during an activity.
Inputs: activityId (required).
get_activity_splitsCRead-onlyInspect
An activity's laps.
Inputs: activityId (required).
get_activity_split_summariesCRead-onlyInspect
Summaries of an activity's splits.
Inputs: activityId (required).
get_activity_typed_splitsCRead-onlyInspect
An activity's typed splits, richer than getActivitySplits for some sports. Richer detail than getActivitySplits for some activity types (e.g. Bouldering).
Inputs: activityId (required).
get_activity_typesBRead-onlyInspect
Every activity type Garmin knows: { typeId, typeKey, parentTypeId, ... }.
Inputs: no named parameters.
get_activity_weatherCRead-onlyInspect
The weather recorded for an activity.
Inputs: activityId (required).
get_activity_workoutsBRead-onlyInspect
The workouts done during an activity, with the steps the device ran. GETs /activity-service/activity/{id}/workouts: the workouts done during the activity, {index, workoutName, timeCreated, sport, manufacturer, multisportSet, steps, workoutPhrase} with the steps the device ran (PersonalApi.ActivityWorkoutDTO, matched key for key, steps included). [] for an activity done without one.
Inputs: activityId (required).
get_adaptive_training_plan_by_idARead-onlyInspect
One adaptive (Garmin Coach) training plan by id. GETs /trainingplan-service/trainingplan/fbt-adaptive/{planId}, a distinct sub-path from getTrainingPlanById's phased path.
Inputs: planId (required).
get_adaptive_workoutARead-onlyInspect
A Garmin Coach workout by its workoutUuid (getWorkoutById cannot). GETs /workout-service/fbt-adaptive/{uuid}: a Garmin Coach workout with segments, steps and estimatedTrainingEffect. Coach workouts have no workoutId, and getWorkoutById cannot fetch them: /workout-service/workout/{uuid} is a 404. Take the uuid from getTrainingPlanWorkouts or getScheduledWorkoutSummaries.
Inputs: workoutUuid (required).
get_adhoc_challengesBRead-onlyInspect
Ad-hoc challenges the account took part in. GETs /adhocchallenge-service/adHocChallenge/historical; start validated non-negative, limit validated positive (throws GarminError otherwise); returns an ARRAY, verified live.
Inputs: limit (required), start (required).
get_all_day_eventsBRead-onlyInspect
Daily events for one date (Garmin's dailyEvents feed).
Inputs: cdate (required).
get_all_day_stressBRead-onlyInspect
All-day stress levels for one date.
Inputs: cdate (required).
get_available_badge_challengesBRead-onlyInspect
Badge challenges the account can join. Garmin rejects start=0; start at 1. GETs /badgechallenge-service/badgeChallenge/available; same start/limit validation; same array-not-dict correction and same live start=0 -> 400 discovery as getBadgeChallenges.
Inputs: limit (required), start (required).
get_available_badgesARead-onlyInspect
Badges the account can still earn, each with badgeImageUrls added. GETs /badge-service/badge/available?showExclusiveBadge=true; same badgeImageUrls as getEarnedBadges; stays nullable.
Inputs: no named parameters.
get_badge_challengesARead-onlyInspect
Completed badge challenges. Garmin rejects start=0; start at 1. GETs /badgechallenge-service/badgeChallenge/completed; same start/limit validation as getAdhocChallenges; returns an ARRAY, verified live. Live discovery: Garmin's server rejects start=0 with a 400 ("start should > 0.") on this endpoint even though the client-side check allows it (non-negative); the 400 is Garmin's server, not a wrong URL; call with start>=1 in practice.
Inputs: limit (required), start (required).
get_badge_detailARead-onlyInspect
One badge with its related series and what earned it. Works for unearned badges. GETs /badge-service/badge/detail/v3/{badgeId}, the request Garmin Connect's web app makes when a badge is opened; badgeId validated as a positive integer. Returns an OBJECT: the getEarnedBadges fields plus relatedBadges (the rest of the series, each with earnedByMe), badgeAssocType/badgeAssocDataId/badgeAssocDataName (for "activityId", the activity that earned it) and followings. An unknown id is a 400 GarminHttpError, not a 404. The badge and each relatedBadges entry gain `badgeImageUâĻ
Inputs: badgeId (required).
get_blood_pressureARead-onlyInspect
Blood-pressure readings for a date or a date range (enddate defaults to startdate).
Inputs: startdate (required), enddate.
get_body_batteryARead-onlyInspect
Daily Body Battery reports for a date or a date range (enddate defaults to startdate).
Inputs: startdate (required), enddate.
get_body_battery_eventsCRead-onlyInspect
Body Battery events for one date.
Inputs: cdate (required).
get_body_compositionARead-onlyInspect
Body-composition data for a date or a date range (enddate defaults to startdate). GETs /weight-service/weight/dateRange; throws GarminError if startdate > enddate getStatsAndBody (wellness service) now delegates to this instead of inlining its own copy of the same call.
Inputs: startdate (required), enddate.
get_calendar_eventARead-onlyInspect
One calendar event by id. GETs /calendar-service/event/{id}; a missing id is a 404 GarminHttpError.
Inputs: eventId (required).
get_calories_dailyARead-onlyInspect
Active, resting and total calories per day over a date range. Merges active (metricId 22) and resting/BMR (metricId 23) series into [{calendarDate, active, resting, total}].
Inputs: end (required), start (required).
get_courseARead-onlyInspect
One saved course by id. GETs /course-service/course/{courseId}; a missing id is a 404 GarminHttpError ("Course not found : {id}").
Inputs: courseId (required).
get_current_max_dive_numberBRead-onlyInspect
Current maximum Dive number; reading does not reserve the next number. Reads, does not reserve the next number.
Inputs: no named parameters.
get_custom_foodsARead-onlyInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Your custom foods, optionally filtered by name (limit <= 20). Needs Connect+. GETs /nutrition-service/customFood with includeContent=true: {customFoods, moreDataAvailable}. limit is capped at 20 (Garmin 400s above it). There is NO get-by-id: GET /customFood/{id} is a 405, so search by name to read one back.
Inputs: limit, start, search.
get_custom_food_serving_unitsARead-onlyInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Serving units a custom food can use. Needs Connect+. GETs /nutrition-service/metadata/customFoodServingUnits (13 units).
Inputs: no named parameters.
get_cycling_ftpARead-onlyInspect
The latest cycling functional threshold power (FTP). Latest value only; use getFunctionalThresholdPowerRange for history.
Inputs: no named parameters.
get_daily_hydrationARead-onlyInspect
Daily hydration in milliliters, with the goal, over a date range; ranges over 31 days are chunked. GETs /usersummary-service/stats/hydration/daily/{start}/{end}: {calendarDate, valueInML, goalInML} per day that has an entry (the spec's sweatLossInML/activityIntakeInML were not seen). Garmin 400s end - start > 30 ("cannot be more than 31 days"), so longer ranges go in 31-day windows.
Inputs: end (required), start (required).
get_daily_statsARead-onlyInspect
Per-day calorie or step totals; ranges over 28 days are chunked. GETs /usersummary-service/stats/daily/{start}/{end}?statsType=CALORIES|STEPS; statsType is exactly "CALORIES" or "STEPS" (any other value, lower-case included, is a Garmin 404). Garmin 400s when end - start > 27, so longer ranges are fetched in 28-day windows and the rows concatenated; Garmin's per-request aggregations (averages) are DROPPED rather than returned wrong for a chunked range. A range with no data returns [] (Garmin answers null). Overlaps getDailySteps/getCaloriesDaily; this one returns total/actâĻ
Inputs: end (required), start (required), statsType (required).
get_daily_stepsBRead-onlyInspect
Daily step totals over a date range; ranges over 28 days are fetched in chunks. Auto-chunks ranges over Garmin's 28-day-per-request limit into â¤28-day windows and concatenates; a single request within the limit.
Inputs: end (required), start (required).
get_daily_stressARead-onlyInspect
Daily stress level and time at each stress level over a date range; ranges over 28 days are chunked. GETs /usersummary-service/stats/stress/daily/{start}/{end}: {calendarDate, values: {overallStressLevel, restStressDuration, lowStressDuration, mediumStressDuration, highStressDuration}} per day, durations in seconds. Garmin 400s end - start > 27 ("cannot be more than 28 days"), so longer ranges go in 28-day windows; a reversed range throws GarminError before any request.
Inputs: end (required), start (required).
get_daily_summariesARead-onlyInspect
One whole-day summary per day: steps, calories, heart rate, stress, Body Battery, SpO2 and more. Ranges over a year are chunked. GETs /usersummary-service/v2/dailysummaries?startDate&endDate and unwraps data: one object per day grouped by topic (movement, calories, heartRate, intensityMinutes, stress, bodyBattery, hydration, respiration, pulseOx, jetLag), typed from PersonalApi.UserDailySummaryV2DTO. Garmin caps one request at a year ("must be P1Y or less": a 365-day span passes, 366 is a 400), so longer ranges go in 365-day windows. Days with no data are ABSENT, notâĻ
Inputs: end (required), start (required).
get_daily_weigh_insBRead-onlyInspect
Every weigh-in recorded on one date. GETs /weight-service/weight/dayview/{cdate}?includeAll=true.
Inputs: cdate (required).
get_device_alarmsARead-onlyInspect
Every alarm configured on every registered device. No HTTP path of its own: calls getDevices() once, then getDeviceSettings(device.deviceId) once per device (N+1 fan-out, sequential by design; do not parallelize), concatenating each device's alarms; a device with no alarms contributes nothing, never throws for that case.
Inputs: no named parameters.
get_device_last_usedBRead-onlyInspect
The device used most recently. Also used internally by pushWorkoutToDevice to resolve a missing deviceId.
Inputs: no named parameters.
get_devicesARead-onlyInspect
Every device registered to the account. Undocumented per-device shape, deviceId is the field the other device methods key off of.
Inputs: no named parameters.
get_device_settingsARead-onlyInspect
One device's settings, by the deviceId from getDevices. deviceId coerced to an int, validated positive, re-stringified before being placed in the path Two-call sequence: get a deviceId from a getDevices() entry first, then pass it here.
Inputs: deviceId (required).
get_device_solar_dataARead-onlyInspect
A solar device's charging input for a date or a date range (enddate defaults to startdate). The only raising method in this group: throws GarminConnectionError if the response is falsy or missing the deviceSolarInput key; returns resp.deviceSolarInput, NOT the envelope. enddate defaults to startdate, and singleDayView is sent "true" exactly when enddate was omitted.
Inputs: deviceId (required), startdate (required), enddate.
get_dive_gearCRead-onlyInspect
Numeric Dive gear ID and explicit local YYYY-MM-DD calendar date. Explicit local YYYY-MM-DD date.
Inputs: gearId (required), currentUserDate (required).
get_dive_gear_summariesCRead-onlyInspect
Dive equipment summaries, distinct from Connect shoes/bicycles. Numeric Dive gear, unrelated to Connect gear UUIDs.
Inputs: filters.
get_dive_logARead-onlyInspect
Full Dive detail by Dive ID, not Connect activity ID. Full detail by Dive ID; depth and bottom-time measurements are under profile.
Inputs: diveActivityId (required).
get_dive_log_by_connect_activity_idCRead-onlyInspect
Full Dive detail using the explicit Connect activity ID bridge. Explicit ID bridge.
Inputs: connectActivityId (required).
get_dive_logsBRead-onlyInspect
One page of Dive summaries; no assumed paging defaults or automatic traversal. One page: {totalCount, diveActivities?}, with optional pageSize/pageNumber; an empty account returns only {totalCount: 0}, with or without paging params. Use page?.diveActivities?.[0]; no library-selected paging defaults.
Inputs: filters.
get_diver_certificationDRead-onlyInspect
Numeric Dive gear ID and explicit local YYYY-MM-DD calendar date. Checks CERTIFICATION type; explicit local YYYY-MM-DD date.
Inputs: gearId (required), currentUserDate (required).
get_diver_certificationsCRead-onlyInspect
Certification cards are Dive gear wrappers, not Connect gear UUID records. Gear wrappers, not bare cards.
Inputs: no named parameters.
get_diver_privacyCRead-onlyInspect
Diver profile/statistics and default activity visibility settings. Profile and default activity settings.
Inputs: no named parameters.
get_dive_tagsBRead-onlyInspect
Available Dive tag keys mapped to their numeric values. Tag key to number map.
Inputs: no named parameters.
get_earned_badgesARead-onlyInspect
Badges the account has earned, each with badgeImageUrls added. GETs /badge-service/badge/earned; each badge gains badgeImageUrls: { small, large }, added by this library (Garmin sends no image URL): https://connect.garmin.com/images/badges/xxhdpi/badge_<badgeUuid ?? badgeId>_sml.png (_lrg.png for large), the URL Garmin Connect's web app builds; public, no session. Every other field passes through unchanged; stays nullable (does NOT coalesce to []).
Inputs: no named parameters.
get_endurance_scoreARead-onlyInspect
Endurance score for a date, or weekly aggregates over a date range. TWO branches by presence of enddate: no enddate hits the single-day endpoint; with enddate hits .../stats with hard-coded aggregation="weekly".
Inputs: startdate (required), enddate.
get_fitness_age_dataCRead-onlyInspect
Fitness age for one date.
Inputs: cdate (required).
get_floorsBRead-onlyInspect
Floors climbed and descended for one date. Throws GarminError if Garmin returns nothing.
Inputs: cdate (required).
get_functional_threshold_power_rangeARead-onlyInspect
Functional threshold power (FTP) history for a sport over a date range. Defaults sport="RUNNING", aggregation="daily"; sport upper-cased and validated (^[A-Z_]+$); aggregation restricted to {daily,weekly,monthly,yearly}.
Inputs: end (required), start (required), sport, aggregation.
get_gearARead-onlyInspect
Every piece of gear on the account. userProfileNumber is the profile's numeric id. Hits /gear-service/gear/filterGear?userProfilePk=...; returns an ARRAY of gear entries, verified live. This is the dedicated gear-CRUD service, distinct from getActivityGear (activities service, reuses the same base URL with activityId instead).
Inputs: userProfileNumber (required).
get_gear_activitiesBRead-onlyInspect
Activities that used a piece of gear (limit capped at 1000); [] if it is unknown. limit clamped to 1000; returns [] on a 404 instead of throwing.
Inputs: gearUUID (required), limit.
get_gear_defaultsARead-onlyInspect
Which gear is the default for which activity types. GETs /gear-service/gear/user/{userProfileNumber}/activityTypes; returns an ARRAY of {uuid, activityTypePk, defaultGear} entries, verified live.
Inputs: userProfileNumber (required).
get_gear_statsARead-onlyInspect
Usage totals for one piece of gear; {} if it is unknown. GETs /gear-service/gear/stats/{gearUUID}; gearUUID validated via validateUuid (hex, hyphens optional); returns {} on a 404 instead of throwing; other errors re-raised.
Inputs: gearUUID (required).
get_goalsARead-onlyInspect
The account's goals with a given status (active, future or past), every page fetched. Sends the Sec-Fetch-Site: same-origin header Garmin needs to return newer goal types. Defaults status="active", **start=1**, limit=30. start defaults to 1, NOT 0, because goal-service is 1-INDEXED and start=0 silently returns []; throws GarminError before any request for an invalid status. Paginated, multi-call: starting at start, fetches successive pages of limit entries (incrementing start by limit each call) until a page comes back empty/falsy, same fixed-page-size pattern as `geâĻ
Inputs: limit, start, status.
get_golf_club_statsARead-onlyInspect
Per-club golf stats. Defaults limit=1000; validated positive; GETs /gcs-golfcommunity/api/v2/club/player; hyphenated query params per-page and include-stats (literal "true"). An ARRAY, verified live: the test account returned a JSON ARRAY of 17 club entries ({id, clubTypeId, shaftLength, flexTypeId, averageDistance, adviceDistance, retired, deleted, lastModifiedTime}), not a single object.
Inputs: limit.
get_golf_scorecardBRead-onlyInspect
One golf scorecard in full. GETs /gcs-golfcommunity/api/v2/scorecard/detail; hyphenated query params scorecard-ids and include-longest-shot-distance (sent as the literal string "true").
Inputs: scorecardId (required).
get_golf_shot_dataARead-onlyInspect
Shot data for a scorecard, optionally for some holes only (e.g. "1,2,3"). GETs /gcs-golfcommunity/api/v2/shot/scorecard/{scorecardId}/hole; holeNumbers accepts commas or hyphens as separators (spaces stripped), re-joined with - before sending as the hyphenated hole-numbers param; if any requested hole number is >9, the filter is silently dropped and all 18 holes are requested instead (Garmin's endpoint drops double-digit hole numbers from a filtered query); omitting holeNumbers also fetches all 18.
Inputs: scorecardId (required), holeNumbers.
get_golf_summaryARead-onlyInspect
A page of golf scorecard summaries. Defaults start=0, limit=100; start validated non-negative, limit validated positive (throws GarminError otherwise); query params are literally hyphenated (per-page, start), matching Garmin's own naming. An OBJECT, not an array, verified live: the test account (0 rounds recorded) returned a single pagination-envelope OBJECT {pageNumber, rowsPerPage, totalRows}, not an array.
Inputs: limit, start.
get_golf_user_statsBRead-onlyInspect
Golf handicap and strokes-gained overview. GETs /gcs-golfcommunity/api/v2/player/stats; handicap and strokes-gained overview, no params.
Inputs: no named parameters.
get_heart_ratesBRead-onlyInspect
Heart-rate samples plus resting, min and max heart rate for one date.
Inputs: cdate (required).
get_heart_rate_zonesBRead-onlyInspect
Heart-rate zone profiles: DEFAULT plus any per-sport ones.
Inputs: no named parameters.
get_hill_scoreBRead-onlyInspect
Hill score for a date, or daily values over a date range. TWO branches by presence of enddate, same shape as getEnduranceScore but the range branch hard-codes aggregation="daily" (NOT "weekly"; do not conflate the two).
Inputs: startdate (required), enddate.
get_hrv_dataBRead-onlyInspect
Heart-rate variability (HRV) readings and status for one date.
Inputs: cdate (required).
get_hrv_data_rangeBRead-onlyInspect
Daily HRV summaries over a date range.
Inputs: end (required), start (required).
get_hydration_dataCRead-onlyInspect
The hydration log for one date.
Inputs: cdate (required).
get_in_progress_badgesARead-onlyInspect
Badges with progress towards them, from the earned and available lists. No HTTP path of its own: calls getEarnedBadges() and getAvailableBadges(), filters each with an in-progress predicate (progress truthy; if progress === target, only "in progress" when badgeLimitCount is set and badgeEarnedNumber < badgeLimitCount), then merges both filtered lists into a Map keyed by badgeId (available overwrites earned on collision, keeping the earned entry's position); never raises: a null from either call is treated as []. Badges carry badgeImageUrls (inherited from the two calls).
Inputs: no named parameters.
get_inprogress_virtual_challengesARead-onlyInspect
Virtual challenges in progress. start must be at least 1. GETs /badgechallenge-service/virtualChallenge/inProgress; asymmetric validation: start validated POSITIVE here (rejects start=0), unlike the non-negative start on the four challenge methods above; limit validated positive; same array-not-dict correction.
Inputs: limit (required), start (required).
get_intensity_minutes_dataCRead-onlyInspect
Moderate and vigorous intensity minutes for one date.
Inputs: cdate (required).
get_lactate_thresholdARead-onlyInspect
Lactate threshold: the latest values (default), or history over a date range when latest is false. Defaults latest=true, aggregation="daily". TWO DIFFERENT branches: latest=true returns {speed_and_heart_rate, power} from two GETs; latest=false (requires startDate, throws otherwise) returns {speed, heart_rate, power} from three GETs.
Inputs: latest, endDate, startDate, aggregation.
get_last_activityARead-onlyInspect
The most recent activity, or null if there are none. Delegates to getActivities(0, 1), returns the last element or null.
Inputs: no named parameters.
get_lifestyle_logging_dataBRead-onlyInspect
Lifestyle logging entries for one date. GETs /lifestylelogging-service/dailyLog/{cdate} Grouped under misc per the plan's explicit instruction, even though it superficially resembles a wellness-daily endpoint.
Inputs: cdate (required).
get_max_metricsBRead-onlyInspect
Max metrics (VO2 max and related values) for one date. The date is repeated twice in the path (start=end=cdate).
Inputs: cdate (required).
get_max_metrics_rangeARead-onlyInspect
Max metrics (VO2 max and related values) over a date range. Throws GarminError if start > end.
Inputs: end (required), start (required).
get_menstrual_calendar_dataARead-onlyInspect
Menstrual-cycle calendar data between two dates (Garmin allows up to 91 days). Garmin rejects windows of 92+ inclusive days; not enforced here (caller's responsibility).
Inputs: enddate (required), startdate (required).
get_menstrual_cycle_summaryCRead-onlyInspect
A summary of the menstrual cycle containing a date.
Inputs: fordate (required).
get_menstrual_data_for_dateBRead-onlyInspect
The menstrual-cycle day view for one date.
Inputs: fordate (required).
get_menstrual_last_confirmedCRead-onlyInspect
The last confirmed period as of a date.
Inputs: fordate (required).
get_menstrual_reportsARead-onlyInspect
Menstrual-cycle reports over the last 1, 6 (the default) or 12 cycles. Defaults numberOfCycles=6, nextReport=false, reportType="CYCLE", todayCalendarDate defaults to today; numberOfCycles restricted to {1,6,12} or throws GarminError.
Inputs: fordate (required), options, numberOfCycles.
get_morning_training_readinessARead-onlyInspect
The training readiness score computed after waking up on a date. Delegates to getTrainingReadiness, no HTTP call of its own; filters for inputContext === "AFTER_WAKEUP_RESET", falls back to the first entry; null for a falsy or empty result.
Inputs: cdate (required).
get_next_scheduled_workoutARead-onlyInspect
The next scheduled workout from this month or next, or {} if there is none. Computed from two getScheduledWorkouts calls (this month + next, handling Dec->Jan rollover); returns {} if nothing matches, never throws.
Inputs: no named parameters.
get_non_completed_badge_challengesARead-onlyInspect
Badge challenges joined but not completed. Garmin rejects start=0. GETs /badgechallenge-service/badgeChallenge/non-completed; same start/limit validation; same array-not-dict correction and same live start=0 -> 400 discovery as getBadgeChallenges.
Inputs: limit (required), start (required).
get_nutrition_daily_food_logCRead-onlyInspect
The food log for one date. GETs /nutrition-service/food/logs/{cdate}.
Inputs: cdate (required).
get_nutrition_daily_mealsCRead-onlyInspect
Meals logged on one date. GETs /nutrition-service/meals/{cdate}.
Inputs: cdate (required).
get_nutrition_daily_settingsARead-onlyInspect
Nutrition settings and goals in effect on one date. GETs /nutrition-service/settings/{cdate}.
Inputs: cdate (required).
get_nutrition_food_log_rangeARead-onlyInspect
Daily food logs over a range; works without Connect+. GETs /nutrition-service/food/logs/range?startDate&endDate: {dailyNutritionSummaries}, one day-log per day that has anything logged.
Inputs: enddate (required), startdate (required).
get_personal_recordARead-onlyInspect
The account's personal records, one row per record type. GETs /personalrecord-service/personalrecord/prs/{displayName}; no args PersonalRecords is PersonalRecord[], an ARRAY, verified live (the test account returned array[0]). Note the plural type name: the method name is singular but the payload is a list.
Inputs: no named parameters.
get_power_zonesCRead-onlyInspect
Power zone profiles.
Inputs: no named parameters.
get_power_zones_for_sportBRead-onlyInspect
Power zones for one sport, e.g. "CYCLING". sport upper-cased and validated the same way as getFunctionalThresholdPowerRange.
Inputs: sport (required).
get_pregnancy_summaryCRead-onlyInspect
The pregnancy-tracking summary.
Inputs: no named parameters.
get_primary_training_deviceCRead-onlyInspect
The account's primary training device.
Inputs: no named parameters.
get_progress_summary_between_datesBRead-onlyInspect
Totals of one metric (default distance) between two dates, grouped by activity type by default. Defaults metric="distance", groupbyactivities=true.
Inputs: enddate (required), startdate (required), metric, groupbyactivities.
get_race_predictionsARead-onlyInspect
Predicted race times: the latest, or daily/monthly history when all three args are given. TWO branches, all-or-nothing params (throws on a partial combination): no params hits .../latest/{displayName}; all three hit .../{type}/{displayName}, capped at a 366-day span.
Inputs: type, enddate, startdate.
get_respiration_dataCRead-onlyInspect
Breathing-rate data for one date.
Inputs: cdate (required).
get_rhr_dailyARead-onlyInspect
Resting heart rate per day over a date range, as { calendarDate, value } rows. Reshapes allMetrics.metricsMap into [{calendarDate, value}], dropping null values.
Inputs: end (required), start (required).
get_rhr_dayCRead-onlyInspect
Resting heart rate for one date.
Inputs: cdate (required).
get_running_toleranceBRead-onlyInspect
Running tolerance over a date range, aggregated weekly (the default) or daily. Defaults aggregation="weekly"; restricted to {daily,weekly} (narrower than the FTP/lactate methods).
Inputs: enddate (required), startdate (required), aggregation.
get_scheduled_workout_by_idBRead-onlyInspect
One scheduled workout by its scheduled-workout id. Uses a DIFFERENT base (/workout-service/schedule) than getScheduledWorkouts (/calendar-service).
Inputs: scheduledWorkoutId (required).
get_scheduled_workoutsARead-onlyInspect
The calendar for one month (month is 1-12): scheduled workouts, events and more. month is 1-12 on the way in, converted to 0-indexed on the wire; validates year>=2000, month 1-12.
Inputs: year (required), month (required).
get_scheduled_workout_summariesARead-onlyInspect
Every scheduled workout between two dates, as compact summaries. POSTs the fixed GraphQL query workoutScheduleSummariesScalar(startDate, endDate): every scheduled workout in the range, plan or self-scheduled (tpType: null), as compact rows whose scheduledWorkoutId is what unscheduleWorkout takes, or null for a Garmin Coach workout, which also has tpType: null like a self-scheduled one (tell them apart by fbtAdaptivePlanId). Dates are validated before they are spliced into the query. A GraphQL error arrives as HTTP 200 with errors, turned into a GarminError. *It LAGS writesâĻ
Inputs: enddate (required), startdate (required).
get_sleep_dailyARead-onlyInspect
Per-night sleep stats over a date range; ranges over 28 days are fetched in chunks. Garmin's endpoint has a documented 28-day-per-request limit; ranges beyond that are auto-chunked, de-duplicated by calendarDate, and sorted.
Inputs: end (required), start (required).
get_sleep_dataBRead-onlyInspect
Sleep data for one date: the night's summary and its sleep levels.
Inputs: cdate (required).
get_spo2_acclimationARead-onlyInspect
One day's SpO2 readings with altitude acclimation. GETs /wellness-service/wellness/daily/spo2acclimation/{cdate} (Garmin's Personal API spec): the day's SpO2 averages, sleep and hourly series and the monitoring environment, typed from PersonalApi.DailySpO2AndAcclimationDTO. Distinct from getSpo2Data's path. A day with no data (even 2030-01-01) still returns the object, fields null.
Inputs: cdate (required).
get_spo2_dataBRead-onlyInspect
Pulse-oximeter (SpO2) readings for one date. Coerces a string lastSevenDaysAvgSpO2 to a number.
Inputs: cdate (required).
get_statsCRead-onlyInspect
Alias of getUserSummary. Alias of getUserSummary.
Inputs: cdate (required).
get_stats_and_bodyCRead-onlyInspect
getUserSummary merged with the day's body-composition averages. Merges getUserSummary with the body-composition totalAverage block, delegating to getBodyComposition (bodyComposition service) for the latter.
Inputs: cdate (required).
get_steps_dataARead-onlyInspect
Step counts for one date, as a series of time intervals; [] if there are none.
Inputs: cdate (required).
get_stress_dataBRead-onlyInspect
Alias of getAllDayStress. Identical URL to getAllDayStress; an alias.
Inputs: cdate (required).
get_training_plan_by_idCRead-onlyInspect
One phased training plan by id. GETs /trainingplan-service/trainingplan/phased/{planId}.
Inputs: planId (required).
get_training_plansBRead-onlyInspect
The account's training plans. GETs /trainingplan-service/trainingplan/plans; no params.
Inputs: no named parameters.
get_training_plan_workoutsARead-onlyInspect
Enrolled training plans' workouts around a date, grouped by plan. POSTs GraphQL trainingPlanScalar(calendarDate, lang, firstDayOfWeek) (all three arguments are REQUIRED by Garmin) and unwraps trainingPlanWorkoutScheduleDTOS: one entry per enrolled plan, {trainingPlanId, planName, trainingPlanClassification, trainingPlanDetailsDTO, workoutScheduleSummaries}. Garmin picks the window (18 workouts across several weeks for an ITP plan); [] with no plan.
Inputs: calendarDate (required), options.
get_training_readinessBRead-onlyInspect
Training readiness entries for one date.
Inputs: cdate (required).
get_training_statusCRead-onlyInspect
Training status for one date.
Inputs: cdate (required).
get_user_profileCRead-onlyInspect
Cached per instance; every date-scoped endpoint needs the display name.
Inputs: no named parameters.
get_userprofile_settingsBRead-onlyInspect
The account's profile settings record, from /userprofile-service/userprofile/settings. Distinct from getUserSettings() ("user-settings"): the two paths are one character apart. GETs /userprofile-service/userprofile/settings (SINGULAR "settings", distinct from getUserSettings's "user-settings"; the two paths are one character apart and easy to transpose) Three profile endpoints, three methods: getUserProfile() reads /userprofile-service/socialProfile (and backs displayName/fullName/userName), getUserSettings() reads /userprofile-service/userprofile/user-settings (and backâĻ
Inputs: no named parameters.
get_user_settingsCRead-onlyInspect
Cached per instance, same eviction-on-failure pattern as getUserProfile().
Inputs: no named parameters.
get_user_summaryBRead-onlyInspect
The daily summary for one date: steps, distance, calories and the rest of the day's totals.
Inputs: cdate (required).
get_weekly_intensity_minutesBRead-onlyInspect
Weekly intensity-minute totals between two dates.
Inputs: end (required), start (required).
get_weekly_stepsBRead-onlyInspect
Weekly step totals for the weeks weeks (default 52) ending on end. weeks defaults to 52, must be a positive integer.
Inputs: end (required), weeks.
get_weekly_stressBRead-onlyInspect
Weekly stress averages for the weeks weeks (default 52) ending on end. Same weeks default/validation as getWeeklySteps.
Inputs: end (required), weeks.
get_weigh_insCRead-onlyInspect
Weigh-ins between two dates.
Inputs: enddate (required), startdate (required).
get_weight_goalsARead-onlyInspect
The weight goals in effect between two dates, in grams. GETs /goal-service/goal/user/effective/weightgoal/{start}/{end}: {userGoals, userGoalRanges}, weights in GRAMS (PersonalApi.UserGoalsRangeDTO). No range limit found (1000 days answered); a reversed range throws before any request although Garmin itself accepts one.
Inputs: enddate (required), startdate (required).
get_workout_by_idCRead-onlyInspect
One workout from the library by id.
Inputs: workoutId (required).
get_workoutsCRead-onlyInspect
A page of the workout library (start defaults to 0, limit to 100). Defaults start=0, limit=100, stays nullable (does NOT coalesce to []).
Inputs: limit, start.
has_connect_plusARead-onlyInspect
Whether the account has a Garmin Connect+ subscription, from the cached user profile. The methods in CONNECT_PLUS_METHODS need it and throw GarminConnectPlusRequiredError without. Whether the account has a Garmin Connect+ subscription, read from the cached user profile (/userprofile-service/socialProfile, so usually no extra request): true when hasPremiumSocialIcon is true or userRoles holds any ROLE_SP_FEATURE_n entry. The methods in CONNECT_PLUS_METHODS (searchFoods, getCustomFoods, getCustomFoodServingUnits, createCustomFood, updateCustomFood, deleteCustomFoodâĻ
Inputs: no named parameters.
import_activityBInspect
Imports a .fit, .gpx or .tcx file as an activity. A duplicate raises GarminConnectionError. Multipart upload to /upload-service/upload/{ext} (extension from filename, must be fit/gpx/tcx) with the load-bearing NK/origin/custom User-Agent headers that make Garmin treat it as an import rather than a device sync; a 409 is re-raised as GarminConnectionError ("Activity already exists (duplicate):...").
Inputs: filePath (required).
import_course_gpxAInspect
Parses a GPX file into a course WITHOUT saving it (courseId: null). Multipart POST (field file) to /course-service/course/import. Parses only, saves NOTHING: the result has courseId: null and a RESAMPLED track (13 GPX points came back as 37) with null elevations/timestamps; courseName is the GPX <name>. Only .gpx accepted (only .gpx verified); throws GarminError on an empty response.
Inputs: filePath (required).
init_menstrual_cycle_setupAInspect
Sets up cycle tracking from a first period start date and average period and cycle lengths. Account-level and not undoable; not meant for an account that is already set up. Does NOT also update tracking-preference settings (call updateMenstrualSettings separately for that); not intended for an already-configured account.
Inputs: cycleLength (required), periodLength (required), periodStartDate (required).
list_calendar_eventsARead-onlyInspect
Every event between two dates, inclusive, or every event on the account with no dates. Events also appear in getScheduledWorkouts' month feed as itemType event; this GETs /calendar-service/events, with startDate/endDate when both dates are given (inclusive) or no params for every event on the account; one date alone throws.
Inputs: enddate, startdate.
list_coursesARead-onlyInspect
Every saved course, as { coursesForUser: CourseSummary[] }. GETs /web-gateway/course/owner/ (trailing slash included); returns an ENVELOPE { coursesForUser: CourseSummary[] }, not a bare array.
Inputs: no named parameters.
log_foodAInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Logs a catalogue or custom food into a meal. Needs Connect+. PUTs /nutrition-service/food/logs with one REGULAR_LOG item and returns the whole day's log. FoodLogInput = {date, foodId, servingId, servings? = 1, time?, meal?, source? = "GARMIN", regionCode?, languageCode?}. Pass the catalogue food's source/regionCode/languageCode for a search result. Needs a mealId, which only exists after Garmin's nutrition setup in the app (400 mealId must not be null otherwise; this method throws a clearer error first). The meal is the named one, else the one whose window holds time, âĻ
Inputs: input (required).
preview_workoutARead-onlyInspect
Check a workout and show it in readable form WITHOUT saving anything. Always call this first, show the user the result, and wait for them to confirm before create_workout. Paces are minutes as decimals (4:30 = 4.5), distances metres, times seconds.
Inputs: spec (required).
push_workout_to_deviceAInspect
Sends a workout to a device. Defaults to the newest workout and the most recently used device. Multi-call: resolves a missing deviceId via /device-service/deviceservice/mylastused's userDeviceId, a missing workoutId via getWorkouts(0,1)'s first result (throws if none), then reads getWorkoutById(workoutId).workoutName for the push message on the final POST.
Inputs: deviceId, workoutId.
quick_add_foodAInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Logs an entry by name and macros ("Quick Add"). Needs Connect+. PUTs /nutrition-service/food/logs/quickAdd: an entry by name + calories/carbs/protein/fat with no food behind it (QUICK_ADD). Same meal rules as logFood.
Inputs: input (required).
remove_gear_from_activityAInspect
Unlinks a piece of gear from an activity. PUT, not DELETE; same 404-handling pattern as addGearToActivity.
Inputs: gearUUID (required), activityId (required).
request_reloadAInspect
Asks Garmin to reload a day's wellness data that it has offloaded. POSTs /wellness-service/wellness/epoch/request/{cdate} with no JSON body; asks Garmin to reload/recompute a day's data (Garmin offloads older data, so this forces it back).
Inputs: cdate (required).
schedule_workoutCInspect
Schedules a library workout on a date.
Inputs: dateStr (required), workoutId (required).
search_activitiesBRead-onlyInspect
One page of activities filtered by text, type, dates, distance, duration, power, location and more. One page from /activitylist-service/activities/search/activities (the getActivities endpoint) with the filters Garmin's Personal API spec documents: search, activityType (a PARENT key, includes its subtypes; a subtype there is a 400), activitySubType, excludedActivitySubTypes, eventType, startDate/endDate, min/max distance (m), duration and elapsed duration (s), elevation gain (m), minAvgPower (W), favorite, excludeChildren, sortBy/sortOrder, requiredFields, `boundâĻ
Inputs: filters.
search_exercisesARead-onlyInspect
Find Garmin exercise names for strength, HIIT, cardio, yoga, pilates and mobility steps. Returns CATEGORY / NAME lines; use them as exercise: { category, name }.
Inputs: query (required), category.
search_foodsARead-onlyInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). Food catalogue search. Needs Garmin Connect+. GETs /nutrition-service/food/search?searchExpression&start&limit (defaults 0/20): {results: Food[], moreDataAvailable}; catalogue foods carry source: "FATSECRET" and several servings each.
Inputs: query (required), limit, start.
set_activity_descriptionBInspect
Sets an activity's description. Resolves to null on success.
Inputs: activityId (required), description (required).
set_activity_distanceAInspect
Sets an activity's total distance in meters; Garmin recomputes the average speeds. Partial PUT of summaryDTO.distance in METERS (no conversion; createManualActivity is the one that takes km), the edit Garmin Connect offers for treadmill runs. Garmin recomputes averageSpeed/averageMovingSpeed from it; duration, calories and laps stay as recorded, so the laps no longer sum to the total. getActivities lags the change by a few seconds while getActivity shows it at once. Throws GarminError before any request for a non-positive or non-finite value.
Inputs: meters (required), activityId (required).
set_activity_event_typeAInspect
Files an activity under an event type, e.g. "race" or "training". Partial PUT /activity-service/activity/{id} with {activityId, eventTypeDTO: {typeKey}}. The typeKey alone is enough; Garmin fills in typeId/sortOrder. Throws GarminError before any request for a key outside the nine.
Inputs: eventType (required), activityId (required).
set_activity_exercise_setsADestructiveInspect
Replaces ALL of a strength activity's exercise sets with payload. replace-all semantics, payload sent verbatim. IRREVERSIBLE: confirm with the user before calling.
Inputs: payload (required), activityId (required).
set_activity_feelAInspect
"How did you feel?": 0, 25, 50, 75 or 100, or null to clear it. Partial PUT of summaryDTO.directWorkoutFeel, one of 0/25/50/75/100 ("How did you feel?", very weak to very strong); null clears it. Garmin stores any number (30 read back as 30) that its apps cannot display, so the method refuses anything else.
Inputs: feel (required), activityId (required).
set_activity_nameBInspect
Renames an activity. Resolves to null on success.
Inputs: activityId (required), activityName (required).
set_activity_perceived_effortAInspect
Perceived effort (RPE) 1-10, or null to clear it. Partial PUT of summaryDTO.directWorkoutRpe, which Garmin stores TIMES TEN: pass RPE 1-10 (integer), it sends 10-100; null clears it. Garmin itself rejects 150 with a 400 MEASUREMENT_NOT_VALID. Never read-modify-write the whole summaryDTO instead: PUTting its stored start-coordinate pair back is a 400.
Inputs: rpe (required), activityId (required).
set_activity_typeCInspect
Changes an activity's type. Resolves to null on success.
Inputs: typeId (required), typeKey (required), activityId (required), parentTypeId (required).
set_blood_pressureAInspect
Records a blood-pressure reading (systolic 70-260, diastolic 40-150, pulse 20-250). when defaults to now. Validates systolic 70-260, diastolic 40-150, pulse (if given) 20-250, all integers; when defaults to new Date().
Inputs: systolic (required), diastolic (required), when, notes, +1 more.
set_gear_activity_defaultsADestructiveInspect
Sets which activity types default to this gear. Uses the v2 full-record PUT Garmin's own web client uses (the older dedicated default-gear endpoint is dead). The working way to set gear defaults (the old dedicated default-gear endpoint is dead; there is no setGearDefault). Read-modify-writes the v2 record: GETs /gear-service/gear/v2/{uuid}, replaces associatedActivityTypes with [{activityTypeKey, defaultGear: true, preferredGear: false}] per key, PUTs the whole record back. Keys are lowercase ("running"), matching createGear, NOT setGearDefault's upper-cased form. [] clearâĻ IRREVERSIBLE: confirm with the user before calling.
Inputs: gearUUID (required), activityTypeKeys (required).
set_heart_rate_zonesAInspect
Changes one heart-rate zone profile and returns it as stored. READ-MODIFY-WRITE of one profile: GETs /biometric-service/heartRateZones, overlays {sport? = "DEFAULT", trainingMethod?, maxHeartRate?, restingHeartRate?, lactateThresholdHeartRate?, zoneFloors?: [5 bpm]} with changeState: "CHANGED", PUTs [profile] (204), then returns the profile READ BACK. A sport with no profile starts from DEFAULT's. Setting restingHeartRate also turns off restingHrAutoUpdateUsed. Garmin does NOT recompute floors when the method or a heart rate changes. Send zoneFloors too. Floors must be stricâĻ
Inputs: update (required).
set_sleep_windowAInspect
Sets one night's bedtime and wake time, moving it or creating it; filed under the wake-up date. Sets one night's bedtime and wake time, as Garmin Connect's edit-sleep-times dialog does. cdate is the date Garmin files the night under, the WAKE-UP day. Reads the night through getSleepData first. A RECORDED night's id is its current sleepStartTimestampGMT in epoch ms and CHANGES after every edit, so it is read fresh, then PUT to /sleep-service/sleep/dailySleep/{id} with `{calendarDate, sleepStartTimestampGMT, sleepEndTimestampGMT, sleepTimeSeconds, napTimeSeconds, sleepWindowConfirmed:âĻ
Inputs: cdate (required), sleepEnd (required), sleepStart (required).
sign_in_to_garminAInspect
Sign in to Garmin Connect. Call this when another Garmin tool says you are not logged in or the session expired. It opens a sign-in page in the user's browser; the password and MFA code are entered there, never in the chat. Afterwards, ask the user to tell you when they have finished, then retry.
Inputs: no named parameters.
unit_systemARead-onlyInspect
measurementSystem lives on /userprofile-service/userprofile/user-settings (under userData), not on the social profile. A convenience accessor, not a data endpoint: returns undefined rather than throwing if the payload shape is missing.
Inputs: no named parameters.
unschedule_workoutADestructiveInspect
Removes a workout from the calendar; the workout stays in the library. Removes the calendar entry without deleting the workout template; irreversible. IRREVERSIBLE: confirm with the user before calling.
Inputs: scheduledWorkoutId (required).
update_calendar_eventAInspect
Read-modify-write of the stored event; resolves to null. READ-MODIFY-WRITE: GETs the event, overlays {name?, date?, location?, url?, note?, race?, goalTimeSeconds?} (null clears an optional one), PUTs the whole record back to /calendar-service/event/{id}; Concurrent callers can clobber each other.
Inputs: changes (required), eventId (required).
update_courseAInspect
Rename and/or change privacy. Read-modify-write of the whole record. READ-MODIFY-WRITE: GETs the record, overlays the changes, PUTs the whole record back to /course-service/course/{courseId}, the same request Garmin's own web editor sends on Save (observed 2026-09-24). Concurrent callers can clobber each other. Throws before any request if neither field is given or the name is blank. A just-created course may 429 "not yet ready".
Inputs: changes (required), courseId (required).
update_custom_foodCInspect
Requires a Garmin Connect+ subscription (check with has_connect_plus). FULL REPLACE of a custom food's definition. Needs Connect+. The same PUT carrying both ids. FULL REPLACE: a nutrient or brand left out is removed (verified: the brand was dropped).
Inputs: input (required), foodId (required), servingId (required).
update_menstrual_calendarADestructiveInspect
Rewrites the period days in a date range. Replaces what the range holds; there is no undo. Needs cycle tracking set up in Garmin Connect first. full replace, not a merge; each cycleDatesLists group must be non-empty, consecutive calendar dates, and fall within [startdate, enddate], else throws GarminError. IRREVERSIBLE: confirm with the user before calling.
Inputs: enddate (required), startdate (required), cycleDatesLists (required), options.
update_menstrual_daily_logADestructiveInspect
Logs a day's cycle-tracking entry (symptoms, moods, flow, notes). Replaces whatever that day already holds; there is no undo. Needs cycle tracking set up in Garmin Connect first. full-day replace, not a merge; at least one optional field required or throws GarminError; notes: undefined preserves the existing note, notes: "" clears it (distinct, load-bearing); discharge rejects combining "NO_DISCHARGE" with any other value. IRREVERSIBLE: confirm with the user before calling.
Inputs: calendarDate (required), options.
update_menstrual_settingsAInspect
Changes cycle-tracking preferences (merged into the current ones). Has no effect until cycle tracking is set up in Garmin Connect. settings must be non-empty or throws GarminError; multi-step: GETs /userprofile-service/userprofile/user-settings, overlays settings onto the current userMenstrualCycleSettings, then PUTs the same endpoint, including id if resolvable.
Inputs: settings (required), options.
update_workoutADestructiveIdempotentInspect
Replace an existing workout with a new spec. This OVERWRITES the whole workout; confirm with the user first, ideally after preview_workout. Paces are minutes as decimals (4:30 = 4.5), distances metres, times seconds.
Inputs: spec (required), workoutId (required).
upload_activityAInspect
Uploads an activity file through Garmin's plain device-sync upload path. Multipart upload to the PLAIN /upload-service/upload path, no extension suffix and none of importActivity's load-bearing import headers (ordinary device-sync-shaped upload, distinct from importActivity's spoofed-client import).
Inputs: filePath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogâĻ
TDQS
Scored across 209 tools
With 209 tools, many endpoints overlap heavily: activity retrieval has get_activities, get_activities_for_date, get_activities_by_date, search_activities, get_last_activity, and more; summaries have get_user_summary, get_stats, get_daily_stats, get_daily_summaries, and get_stats_and_body. Descriptions are unusually detailed and often explain distinctions, but the sheer surface makes misselection likely for an agent.
Most tools use snake_case verb_noun names such as get_activities, create_gear, and delete_workout, but there are notable deviations: bare accessors like display_name, full_name, user_name, and unit_system, plus alias-style names like get_stats and get_stress_data. The convention is mostly readable but not uniformly predictable.
209 tools is far beyond a reasonable single-server surface and creates a severe discoverability and selection burden. Even if the underlying Garmin API is broad, this should be split into multiple focused servers or exposed through fewer composite operations.
The surface is extraordinarily comprehensive, covering activities, workouts, courses, gear, badges, nutrition, menstrual tracking, devices, and many wellness metrics. There are still some dead ends and missing lifecycle operations, such as no hydration delete and limited update coverage for several resources, but overall coverage is unusually complete.
Maintenance
Related MCP Connectors
Garmin watch data for AI assistants: activities, sleep, HRV, recovery. Never writes to Garmin.
Garmin data in Claude: 135 tools â activities, sleep, HRV, training, workouts. Free, open source.
Garmin data in Claude & ChatGPT via the Garmin Health API. OAuth sign-in, no password sharing.
Your Garmin, Oura, WHOOP, Hevy and 35 more fitness apps, queryable from your own AI.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to access and query Garmin Connect health and fitness data, including sleep, HRV, training load, and activities, with an optional coaching plugin for personalized training plans.4-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query live Garmin Connect health and fitness data, including daily metrics, activities, sleep analysis, and trends via natural language.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to access and manage Garmin Connect data through 95 tools, including real-time activities, metrics, and downloads.-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to privately explore personal Garmin history, including activities, health metrics, HRV, sleep, and strength training, through self-hosted infrastructure.MIT