Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{"message":"HTTP 403 Forbidden","error":"ForbiddenException"} #41

Open
app4g opened this issue Sep 26, 2023 · 4 comments
Open

{"message":"HTTP 403 Forbidden","error":"ForbiddenException"} #41

app4g opened this issue Sep 26, 2023 · 4 comments

Comments

@app4g
Copy link

app4g commented Sep 26, 2023

sigh.... not working

➜ ~ garpy download --formats fit -u username@gmail.com -p password -a 12xxxxxxx
2023-09-26 14:31:42 INFO - Authenticating GarminClient(username='username@gmail.com', user_agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36')
2023-09-26 14:31:43 DEBUG - POST request sent to https://sso.garmin.com/sso/signin?service=https%3A%2F%2Fconnect.garmin.com%2Fmodern
2023-09-26 14:31:43 DEBUG - Request headers: {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8', 'Accept-Language': 'en-US,en;q=0.5', 'Accept-Encoding': 'gzip, deflate, br', 'origin': 'https://sso.garmin.com', 'Content-Length': '66', 'Content-Type': 'application/x-www-form-urlencoded'}
2023-09-26 14:31:43 DEBUG - Request data: username= username%40gmail.com&password=password&embed=false
2023-09-26 14:31:43 DEBUG - auth ticket url: 'https://connect.garmin.com/modern?ticket=ST-0362034-LUiLPhKH6UdSgt6nXuYZ-cas'
2023-09-26 14:31:43 INFO - Claiming auth ticket
2023-09-26 14:31:45 INFO - Downloading the following formats: ('original',) to this folder: /Users/username/activities
2023-09-26 14:31:45 INFO - Fetching summary information for activity: '12xxxxxx'
2023-09-26 14:31:45 DEBUG - -->GET request sent to URL: https://connect.garmin.com/proxy/activity-service/activity/12xxxxxxx with params: None
2023-09-26 14:31:46 ERROR - Failed to fetch 'summary' for activity id 12xxxxxx.
Response code: 403
{"message":"HTTP 403 Forbidden","error":"ForbiddenException"}
Traceback (most recent call last):
File "/Users/username/.pyenv/versions/3.9.1/bin/garpy", line 8, in
sys.exit(main())
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/garpy/cli.py", line 91, in download
downloader(formats=formats, activity_id=activity_id)
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/garpy/download.py", line 141, in call
activity = Activity.from_garmin_connect(activity_id, self.client)
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/garpy/activity.py", line 108, in from_garmin_connect
response = client.get_activity(activity_id, "summary")
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/garpy/client.py", line 228, in get_activity
response = self.get(
File "/Users/username/.pyenv/versions/3.9.1/lib/python3.9/site-packages/garpy/client.py", line 203, in get
raise ConnectionError(err_message)
ConnectionError: Failed to fetch 'summary' for activity id 12091532009.
Response code: 403
{"message":"HTTP 403 Forbidden","error":"ForbiddenException"}

@TerryGamon
Copy link

same here... a tragedy!

@jamprogramacion
Copy link

I see this error since 4-5 days ago:

garpy download --formats original --username --password
2023-09-29 16:19:13 INFO - Downloading the following formats: ('original',) to this folder: ...
2023-09-29 16:19:13 INFO - Querying list of activities
Traceback (most recent call last):
File "frozen runpy", line 198, in _run_module_as_main
File "frozen runpy", line 88, in run_code
File "\AppData\Roaming\Python\Python311\Scripts\garpy.exe_main
.py", line 7, in
File "\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\garpy\cli.py", line 92, in download
downloader(formats=formats, activity_id=activity_id)
File "\AppData\Roaming\Python\Python311\site-packages\garpy\download.py", line 135, in call
activities = Activities.list(self.client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\garpy\activity.py", line 159, in list
for activity in client.list_activities()
^^^^^^^^^^^^^^^^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\garpyclient\client.py", line 243, in list_activities
response = self.get(
^^^^^^^^^
File "\AppData\Roaming\Python\Python311\site-packages\garpyclient\client.py", line 206, in get
raise ConnectionError(err_message)
ConnectionError: Failed to fetch activities 0 to 99.
Response code: 403
{"clientMessage":"Reference Error ID in error logs for further information","errorId":"822f9c9a-2a97-4aaa-9499-9b5220306ca2","error":"WebApplicationException"}

@HeathVarmette
Copy link

I have a similar error message to @jamprogramacion

@matin
Copy link

matin commented Sep 30, 2023

This is related to the same issue discussed in pe-st/garmin-connect-export#95. The issue can be resolved by migrating to Garth for the authentication.

The discussion includes several examples of projects that performed the migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants