sodelalbert / Withings2Garmin

Are you wondering how to sync data from Withings weight to Garmin Connect? Here is the answer!
94 stars 24 forks source link

Garmin login does not work #12

Open ysaliens opened 2 years ago

ysaliens commented 2 years ago

I'm getting 403 responses when trying to login to Garmin.

I've updated to the latest branch which has the withings API fixes, that works OK but still can't get to Garmin. The login credentials are correct

eitanbehar commented 1 year ago

@ysaliens were u able to overcome this? I am seeing the same problem

Thu 28 Sep 2023 11:57:21 AM UTC
Withings: Refresh Access Token
Withings: Get Measurements
startdate=1695859200
enddate=1695945599
   Measurements received
generating fit file...
appending weight scale record... 2023-09-28 05:59:37 97.047kg 37.435%
fit finish OK
eitan@baconao.net
<Response [200]>
'NoneType' object has no attribute 'group'
Unable to retrieve Garmin username! Most likely: incorrect Garmin login or password!
attempting to upload fit file...
Bad response during GC upload: 403
eitanbehar commented 1 year ago

@sodelalbert any chances to look into this? or where to look into?

AndreLafreniere commented 1 year ago

Nothing works on my side…André L.Le 28 sept. 2023 à 08:48, Eitan Behar @.***> a écrit : @sodelalbert any chances to look into this? or where to look into?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

andrewleech commented 1 year ago

I've run into the issue reported by @eitanbehar as well. I suspect it's different to the original post, regardless though it's causing all garmin communication to fail.

nickalleyne commented 11 months ago

One thing to note @AndreLafreniere and @andrewleech , I believe your credentials are now needed in sync.py, not in config.json. I have updated and created a pull request to modify the README to show that.

That being said, login also does not work for me. I believe there needs to be some form of token needed (if possible) as Garmin now has MFA available. I am getting the emails from MFA, but there is no opportunity to add it in.

andrewleech commented 11 months ago

I can still use my PR linked above just fine, credentials in config.json, not in sync.py

I haven't enabled 2FA, I don't know if it'll be possible to support that or not, have to check with the garminconnect package.

nickalleyne commented 11 months ago

Good to know, thanks for the update! I guess my PR is mostly about removing the run.sh comments from the README then.

Yes, Garmin is now enforcing 2FA if you have certain features enabled (for good reason), and so it will likely be required all around at some point. I guess I will wait it out and see if this will work.

nickalleyne commented 11 months ago

Thanks again for all the support, it looks like this other repo has solved the 2FA connundrum: https://github.com/cyberjunky/python-garminconnect

That being said, I am not going to pretend I have the knowledge to dig into how they managed it, vs how this one is.

Anyway, just figured I would throw it here for reference!

andrewleech commented 11 months ago

Thanks again for all the support, it looks like this other repo has solved the 2FA connundrum: https://github.com/cyberjunky/python-garminconnect

My PR https://github.com/sodelalbert/Withings2Garmin/pull/14 is specifically about switching this tool over to using https://github.com/cyberjunky/python-garminconnect for the connect & auth - so that should be fairly easy to bring in whatever 2FA support they have provided.

supernovae commented 11 months ago

A lot of people have to use 2fa now if their have a watch with ECG

andrewleech commented 11 months ago

Have either of you tried my version? Looking through the library used, it says # If there's MFA, you'll be prompted during the login so I'd think it might be working already?

brianschmitt commented 1 month ago

Have either of you tried my version? Looking through the library used, it says # If there's MFA, you'll be prompted during the login so I'd think it might be working already?

Just tried and your changes/branch are working with 2FA - the first time it prompts, but subsequent syncs will reuse the stored creds.

nickalleyne commented 1 month ago

I ended up switching to a different application instead. I could not get this one to work properly.

This one has been working great for me, running with a cronjob daily: https://github.com/jaroslawhartman/withings-sync