Skip to content

429 Too Many Requests - during login (OAuth Preauthorized) #337

@joaoncfsantos

Description

@joaoncfsantos

Hi all,

I have been facing this error with Garmin Connect authentication and I have no idea how to fix it. Am I the only one who's facing this right now?

It seems to be failing specifically on the OAuth preauthorized endpoint.

Traceback:

Logging in to Garmin Connect...
  File "/app/.venv/lib/python3.13/site-packages/garminconnect/__init__.py", line 498, in login
Login failed: 429 Client Error: Too Many Requests for url: https://connectapi.garmin.com/oauth-service/oauth/preauthorized?ticket=ST-2270077-9MyIgeAH1WjPg9JzkUUI-cas&login-url=https://sso.garmin.com/sso/embed&accepts-mfa-tokens=true (status=429)
    return _complete_login(client)
    token1, token2 = self.garth.login(
Traceback (most recent call last):
                     ~~~~~~~~~~~~~~~~^
        self.password,
  File "/app/.venv/lib/python3.13/site-packages/garth/sso.py", line 267, in _complete_login
        self.username,
                                           ~~~~~~~~~^
        ^^^^^^^^^^^^^^
    )
        *args, **kwargs, client=self
        ^^^^^^^^^^^^^^
    ^
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ^
        prompt_mfa=self.prompt_mfa,
    self.oauth1_token, self.oauth2_token = sso.login(
  File "/app/.venv/lib/python3.13/site-packages/garth/http.py", line 203, in login
  File "/app/.venv/lib/python3.13/site-packages/garth/sso.py", line 142, in login
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://connectapi.garmin.com/oauth-service/oauth/preauthorized?ticket=ST-2270077-9MyIgeAH1WjPg9JzkUUI-cas&login-url=https://sso.garmin.com/sso/embed&accepts-mfa-tokens=true
INFO:     100.64.0.9:15782 - "POST /api/v1/sync/garmin HTTP/1.1" 429 Too Many Requests
    oauth1 = get_oauth1_token(ticket, client)
  File "/app/.venv/lib/python3.13/site-packages/garth/sso.py", line 158, in get_oauth1_token
    resp.raise_for_status()
    ~~~~~~~~~~~~~~~~~~~~~^^
  File "/app/.venv/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status

Environment:
garminconnect version: 0.2.40
Python: 3.13

Has Garmin changed their rate limits or is there a known workaround for this?

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