c0deaddict / import-garmin-connect

Import Garmin Connect data into InfluxDB
MIT License
2 stars 0 forks source link

HTTPError: 403 Client Error #3

Open mpenn0 opened 3 years ago

mpenn0 commented 3 years ago

Since two days I get the error:

`INFO:root:Authenticating to Garmin as ... Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/michael/bin/import-garmin-connect/import_garmin_connect/main.py", line 106, in main() File "/home/michael/bin/import-garmin-connect/import_garmin_connect/main.py", line 69, in main session = garmin.authenticate(args.user, args.password) File "/home/michael/bin/import-garmin-connect/import_garmin_connect/garmin.py", line 57, in authenticate response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 941, in raise_for_status raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://sso.garmin.com/sso/signin?clientId=GarminConnect&connectLegalTerms=true&consumeServiceTicket=false&createAccountShown=true&cssUrl=https%3A%2F%2Fconnect.garmin.com%2Fgauth-custom-v1.2-min.css&displayNameShown=false&embedWidget=false&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso&generateExtraServiceTicket=true&generateNoServiceTicket=false&generateTwoExtraServiceTickets=false&globalOptInChecked=false&globalOptInShown=true&id=gauth-widget&initialFocus=true&locale=en_US&locationPromptShown=true&mfaRequired=false&mobile=false&openCreateAccount=false&privacyStatementUrl=https%3A%2F%2Fwww.garmin.com%2Fen-US%2Fprivacy%2Fconnect%2F&redirectAfterAccountCreationUrl=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&redirectAfterAccountLoginUrl=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&rememberMeChecked=false&rememberMeShown=true&rememberMyBrowserChecked=false&rememberMyBrowserShown=false&service=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&showConnectLegalAge=false&showPassword=true&showPrivacyPolicy=false&showTermsOfUse=false&source=https%3A%2F%2Fconnect.garmin.com%2Fsignin%2F&useCustomHeader=false&webhost=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F`

I don't know what I have to change to avoid this error.

c0deaddict commented 3 years ago

It looks like Garmin changed something in their login flow. My Garmin connect import has also been failing for the last week. I did read somewhere that Garmin made some changes to improve the security. I will take a look if this can be fixed when I have time.

mpenn0 commented 3 years ago

Hello Jos, what do you think, would you have desire and time to adapt the interface? Best regards Michael

c0deaddict commented 3 years ago

I mailed Garmin about this issue and I was very disappointed by their answer. They don't want to make an exception for this kind of data collection in their security. And although Garmin offers an API to access the data, it is only available for businesses (to make apps and integrations) and they don't have any plans to make the API available for personal usage :(

mpenn0 commented 3 years ago

Thank you for contacting Garmin for this purpose. It is of course very disappointing what Garmin writes.