Skip to content

Commit

Permalink
Fix new authentication update (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien Abadie committed Feb 27, 2021
1 parent 630dacd commit e71d224
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions garmin_uploader/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
URL_HOSTNAME = 'https://connect.garmin.com/modern/auth/hostname'
URL_LOGIN = 'https://sso.garmin.com/sso/login'
URL_POST_LOGIN = 'https://connect.garmin.com/modern/'
URL_PROFILE = 'https://connect.garmin.com/modern/proxy/userprofile-service/socialProfile/' # noqa
URL_PROFILE = 'https://connect.garmin.com/modern/currentuser-service/user/info' # noqa
URL_HOST_SSO = 'sso.garmin.com'
URL_HOST_CONNECT = 'connect.garmin.com'
URL_SSO_SIGNIN = 'https://sso.garmin.com/sso/signin'
Expand Down Expand Up @@ -148,7 +148,7 @@ def authenticate(self, username, password):
if not res.ok:
raise Exception("Login check failed.")
garmin_user = res.json()
logger.info('Logged in as {}'.format(garmin_user['fullName']))
logger.info('Logged in as {}'.format(garmin_user['username']))

return session

Expand Down Expand Up @@ -213,7 +213,7 @@ def load_activity_types(self):
return self.activity_types

logger.debug('Fetching activity types')
resp = requests.get(URL_ACTIVITY_TYPES)
resp = requests.get(URL_ACTIVITY_TYPES, headers=self.common_headers)
if not resp.ok:
raise GarminAPIException('Failed to retrieve activity types')

Expand Down

0 comments on commit e71d224

Please sign in to comment.