From d410a7c2120317611693b88e966af874cb3e7321 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Thu, 21 Dec 2017 16:09:33 -0800 Subject: [PATCH] Garmin changed the upload endpoint and added some random headers Cribbed from cpfair/tapiriik: https://github.com/cpfair/tapiriik/commit/51226cc012b433e64f2c418d54f3ccde1c75dab9 --- garminexport/garminclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/garminexport/garminclient.py b/garminexport/garminclient.py index b4310cb..b3a3351 100755 --- a/garminexport/garminclient.py +++ b/garminexport/garminclient.py @@ -372,8 +372,8 @@ class GarminClient(object): # upload it files = dict(data=(fn, file)) - response = self.session.post("https://connect.garmin.com/proxy/upload-service-1.1/json/upload/.{}".format(format), - files=files) + response = self.session.post("https://connect.garmin.com/modern/proxy/upload-service/upload/.{}".format(format), + files=files, headers={"nk": "NT"}) # check response and get activity ID if response.status_code != 200: