Closed nowster closed 1 year ago
@felipeam86
Would you care to share how you came up with this fix? How did you identified that you needed to add the headers {"NK": "NT"} ?
The clue was on #90 with the mention of https://github.com/cyberjunky/python-garminconnect
In particular: https://github.com/cyberjunky/python-garminconnect/blob/master/garminconnect/__init__.py#L216 and following.
I also noticed that it's already being done here in this code: https://github.com/petergardfjall/garminexport/blob/master/garminexport/garminclient.py#L477
Had issues with this as well, this solved them, thanks.
Thanks, this also solves the problem for me.
Btw, an easier solution is just to add this header to the session (after line 126):
self.session = session_factory() # existing line 126
self.session.headers.update({"nk": "NT"}) # just add this
This solves it for me as well!
Thanks, this also solves the problem for me.
Btw, an easier solution is just to add this header to the session (after line 126):
self.session = session_factory() # existing line 126 self.session.headers.update({"nk": "NT"}) # just add this
This works for me too!
Thanks for the fix. Can someone make the merge and build the code so that it can be installed via pip?
I can also confirm that adding the header nk with value NT avoids the 402 response and successfully retrieves the data.
This yields a 402 error response code:
curl "https://connect.garmin.com/proxy/activitylist-service/activities/chipbite?start=1&limit=10" -i
Whereas this works:
curl "https://connect.garmin.com/proxy/activitylist-service/activities/chipbite?start=1&limit=10" -H "nk: NT" -i
Sorry for the delay. Have been busy with other stuff for quite some time. I just merged commit 188e97e26ca2bac86d13fbe11d929a1cabf987f5 which is a condensed version of this PR. Credit to @nowster in the commit. Thanks for your contribution! Closing this PR.
Hi @nowster this is solving the issue on my end, thanks!
Would you care to share how you came up with this fix? How did you identified that you needed to add the headers {"NK": "NT"} ?
Thanks