petergardfjall / garminexport

Garmin Connect activity exporter and backup tool
Apache License 2.0
497 stars 85 forks source link

Problem with authentication #87

Closed ilsalgo closed 1 year ago

ilsalgo commented 2 years ago

Hi, the plug-in doesn't work again, i guess it depends on Garmin who introduced two factor authentication, in fact when i try to backup i get an authentication error and immediately also the sms with the verification code.

mmagnus commented 2 years ago

OK, so it's not only me, I have the same problem.

garmin-backup --backup-dir=activities XXXXX --password XXXXXXX

2022-05-15 22:03:10,409 [INFO] backing up formats: json_summary, json_details, gpx, tcx, fit
2022-05-15 22:03:10,409 [INFO] authenticating user ...
2022-05-15 22:03:10,409 [INFO] fetching CSRF token ...
2022-05-15 22:03:11,066 [ERROR] failed with exception: authentication failure: did you enter valid credentials?
Dave-DigiMim commented 2 years ago

I get the same error sometimes... other times it does work.

rickbhs commented 2 years ago

i have the same problem

lakemike commented 2 years ago

Same for me. But interestingly it works when I use garpy. Not sure how that can be because garpy is based on garminexport.

jensbusch commented 2 years ago

Anyone any solution here? I got the same issue

62north commented 1 year ago

For me auth only works if session_factory is set to cloudscraper.create_scraper and this is only set if cloudscraper is installed (otherwise it defaults to requests.session which does not work). Thus I had to pip3 install cloudscraper first.

rickbhs commented 1 year ago

that worked also for me

ilsalgo commented 1 year ago

For me auth only works if session_factory is set to cloudscraper.create_scraper and this is only set if cloudscraper is installed (otherwise it defaults to requests.session which does not work). Thus I had to pip3 install cloudscraper first.

not work for me

rickbhs commented 1 year ago

i needed also sudo pip install cloudscraper to get it worked

ilsalgo commented 1 year ago

no, the problem is the two factor authentication. When I try to connect to my accont, Garmin send a passcode via sms for second authorization (this is necessary for use some services). In this case, I receive the sms but is not possible use the code in Garmin Export.

petergardfjall commented 1 year ago

This library does not support two-factor authentication. I have no intention of adding support at this time.