Registry / http-networking / garth
library0.8.0pypypi✓ verified 86d ago

Garth is a Python client for Garmin SSO authentication and the Garmin Connect API. It provided a way to programmatically log in to Garmin Connect and access user data. As of version 0.8.0, Garth is deprecated and no longer maintained due to changes in Garmin's authentication flow, rendering the library effectively unusable for its primary purpose.

pip install garth
INSTALL
IMPORT
SIG · GARTH
G
garth
http-networkingpythonv0.8.0
Install
6.7s avg
Import
2832ms
Disk
54MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 3.118s · 59.6MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 6.7s · import 2.545s · 60MB
54MB installed
● package 54MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

garth
import garth
Main module for authentication and client access.

This quickstart demonstrates the intended usage for logging into Garmin Connect. However, as of Garth v0.8.0, this functionality is broken and will likely fail due to changes in Garmin's authentication flow. The example is included for historical context and to explicitly highlight the library's deprecated and non-functional status.

import garth import os email = os.environ.get('GARMIN_EMAIL', 'your_email@example.com') password = os.environ.get('GARMIN_PASSWORD', 'your_password') print("Attempting to log in with Garth (will likely fail due to library deprecation).") try: # This login method is now broken due to Garmin's auth flow changes as of Garth v0.8.0 # It is provided for historical context of intended usage. garth.login(email, password) print("Login attempted successfully (unexpected).") # If login miraculously worked, you could access APIs like this: # user_profile = garth.client.connectapi('/userprofile-service/userprofile') # print(f"User Profile: {user_profile}") except Exception as e: print(f"An error occurred during Garth login: {e}") print("This is expected because Garth is deprecated and no longer works with Garmin's current authentication.") print("Please see Garth's GitHub repository for more details on its deprecation.")
Debug
Known issues
breakingGarth is officially deprecated as of v0.8.0 and no longer maintained. Garmin changed its authentication flow, rendering the library's core login functionality unusable.
fix
Garth cannot be used for its intended purpose. Seek alternative solutions for Garmin Connect API access, or consider forking the project if you wish to adapt it to the new authentication requirements.
affects: 0.8.0 onwards
deprecatedImporting `garth` from v0.8.0 onwards will issue a `DeprecationWarning` to explicitly inform users of its inactive status.
fix
Heed the `DeprecationWarning` and plan to migrate away from Garth to an active solution.
affects: 0.8.0 onwards
gotchaPrior to v0.7.9, users frequently encountered 'Client app validation failed' (401) errors due to incorrect client IDs and service URLs (an iOS vs. Android client identity mismatch).
fix
These issues were addressed in v0.7.9. If using an older version, upgrading to 0.7.9+ was the fix, though the library is now deprecated overall.
affects: <0.7.9
gotchaVersions 0.7.7 and 0.7.8 had issues with inconsistent browser headers vs. mobile API endpoints, leading to 401 on login. This was temporarily introduced and then reverted.
fix
Upgrade to v0.7.9 or later to resolve these specific header-related login issues, though the library is now deprecated overall.
affects: 0.7.7, 0.7.8
Errors
Common errors & fixes
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://sso.garmin.com/sso/signin?id=gauth-widget...
Garmin has changed its Single Sign-On (SSO) authentication flow, rendering the Garth library's mobile authentication approach ineffective and causing authentication requests to be rejected with an Unauthorized error.
fix
The Garth library is deprecated and no longer maintained; new logins are not functional. Consider using an alternative method or library that can adapt to Garmin's current authentication requirements, or manually log in to Garmin Connect.
garth.exc.GarthException: Unexpected title: GARMIN Authentication Application
This error occurs because Garmin's SSO login page HTML structure or title has changed, and Garth's parsing logic (which expects a specific page title or elements) can no longer correctly identify and interact with the authentication application.
fix
The Garth library is deprecated and cannot adapt to Garmin's updated authentication page structure. New logins are not supported. There is no direct fix within Garth; alternatives for Garmin Connect API access should be explored.
AssertionError: OAuth1 token is required for OAuth2 refresh
This error indicates a failure in how Garth attempts to refresh authentication tokens, specifically when dealing with MFA-enabled Garmin accounts, due to underlying changes in Garmin's OAuth handling and the library's inability to reconcile OAuth1 and OAuth2 flows effectively.
fix
Garth is deprecated and cannot handle new logins or token refreshes for MFA accounts due to Garmin's changed authentication flow. Using the library for new authentications is not possible. Seek out alternative solutions for programmatic Garmin Connect access.
Upgrade
Version history
0.8.0latest on PyPI · released Mar 28, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
46 hits · last 30 days
node
44
Amazon
1
Resources
garth — pip install garth · libregistry