-
-
Notifications
You must be signed in to change notification settings - Fork 251
Description
Despite successful two-factor authentication (2FA) and token storage via garth, API calls made using the garminconnect client are consistently failing with a 403 Client Error: Forbidden. This suggests the tokens or request headers passed to the API endpoints are no longer accepted by the Garmin server.
The issue occurs when attempting to download data after establishing a session.
Steps to Reproduce
Use the standard garth workflow to authenticate and store a token (garth.login() followed by manual MFA input in the terminal).
Initialize the garminconnect client and attempt a data retrieval call (e.g., client.get_activities(0, 10)).
Observed Behavior
The garth authentication phase succeeds, and the token is saved. However, the subsequent API request fails with a 403 Client Error: Forbidden.
Exact Traceback Snippet from API Failure:
Python
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://connectapi.garmin.com/activitylist-service/activities/search?start=0&limit=10
Note: This error occurs even after the 2FA process is successfully completed.
Technical Environment
The issue appears to be related to incompatibility between the libraries' current versions and Garmin's API requirements.
Python Version: 3.11 / 3.13 (Environment dependent)
garminconnect Version: 0.2.34
garth Version (Dependency): 0.5.19
Conclusion
The server is actively rejecting the request headers/cookies generated by the current combination of garth and garminconnect when accessing the primary activity endpoint (connectapi). This indicates a probable change in required signatures or access rules on the Garmin server side.