From 56c205dce3045afa6ecc535a2f650adf5eccb366 Mon Sep 17 00:00:00 2001 From: Henry J Schmale Date: Sat, 30 Mar 2019 21:52:47 -0400 Subject: [PATCH] Update api.py So there seems to be this issue with the requests oauth where it wasn't correctly encoding the authorization headers. When I patched my copy of the library to use client_id and client_secret I got back a different error that was related to the code. --- fitbit/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fitbit/api.py b/fitbit/api.py index ba9d037..78af59a 100644 --- a/fitbit/api.py +++ b/fitbit/api.py @@ -141,8 +141,8 @@ def fetch_access_token(self, code, redirect_uri=None): self.session.redirect_uri = redirect_uri return self.session.fetch_token( self.access_token_url, - username=self.client_id, - password=self.client_secret, + client_id=self.client_id, + client_secret=self.client_secret, code=code) def refresh_token(self):