Skip to content

[BUG] 403 Forbidden on /activitylist-service/activities/search after successful Garth authentication #303

@marekhor-sys

Description

@marekhor-sys

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions