pe-st / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
374 stars 77 forks source link

urllib.error.HTTPError: HTTP Error 403: Forbidden #86

Open emilybradley00 opened 2 years ago

emilybradley00 commented 2 years ago

Having problems with the logging in process, errors as follows:

Connecting to Garmin Connect... Done. [ERROR] Server couldn't fulfill the request, url https://sso.garmin.com/sso/signin?service=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&webhost=https%3A%2F%2Fconnect.garmin.com&source=https%3A%2F%2Fconnect.garmin.com%2Fen-US%2Fsignin&redirectAfterAccountLoginUrl=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&redirectAfterAccountCreationUrl=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso&locale=en_US&id=gauth-widget&cssUrl=https%3A%2F%2Fstatic.garmincdn.com%2Fcom.garmin.connect%2Fui%2Fcss%2Fgauth-custom-v1.2-min.css&clientId=GarminConnect&rememberMeShown=true&rememberMeChecked=false&createAccountShown=true&openCreateAccount=false&displayNameShown=false&consumeServiceTicket=false&initialFocus=true&embedWidget=false&generateExtraServiceTicket=true&generateTwoExtraServiceTickets=false&generateNoServiceTicket=false&globalOptInShown=true&globalOptInChecked=false&mobile=false&connectLegalTerms=true&locationPromptShown=true&showPassword=true#, code 403, error: HTTP Error 403: Forbidden Requesting Login ticket...Traceback (most recent call last): File "./gcexport.py", line 1342, in main(sys.argv) File "./gcexport.py", line 1292, in main login_to_garmin_connect(args) File "./gcexport.py", line 536, in login_to_garmin_connect login_response = http_req_as_string(f'{URL_GC_LOGIN}#', post_data, headers) File "./gcexport.py", line 266, in http_req_as_string return http_req(url, post, headers).decode() File "./gcexport.py", line 238, in http_req response = OPENER.open(request, data=post) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 569, in error return self._call_chain(args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(args) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden

pe-st commented 2 years ago

The HTTP Error 403: Forbidden message tells that you are not allowed to login (I assume that your password is correct? As I get a 401 Unauthorized with a wrong password).

Hmm... Can you login to the web interface with the same credentials?

emilybradley00 commented 2 years ago

Yep can login with the same username and password (on the normal garmin connect login interface and also when I follow the link that the error gives)!

meksiAziz commented 2 years ago

I have the same issue 😐

gianni4711 commented 2 years ago

same here

gianni4711 commented 2 years ago

now it works again

emilybradley00 commented 2 years ago

ahh I still get the same error. When I login following the link that comes up in the error I get this garmin error, could they have changed the links that are required at the start of the code?

Screen Shot 2022-11-01 at 9 47 07 am
emilybradley00 commented 2 years ago

back working again!