Skip to content

getting missing access token parameter trying to refresh token #94

@pedrobpio

Description

@pedrobpio

Hi,
I'm having an issue here, it might be because I'm a newbie at OAuth and python, or because I'm doing something wrong here, but anyway.
I'm trying to refresh my token and I'm getting the following message:

authd_client.client.refresh_token()

File "C...Python\Python35-32\lib\site-packages\fitbit\api.py", line 162, in refresh_token
auth=requests.auth.HTTPBasicAuth(self.client_id, self.client_secret)
File "C...\Python\Python35-32\lib\site-packages\requests_oauthlib\oauth2_session.py", line 301, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
File "C...\Python\Python35-32\lib\site-packages\oauthlib\oauth2\rfc6749\clients\base.py", line 409, in parse_request_body
_response
self.token = parse_token_response(body, scope=scope)
File "C...\Programs\Python\Python35-32\lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py", line 376, in parse_token_response

validate_token_parameters(params)

File "C...\Python\Python35-32\lib\site-packages\oauthlib\oauth2\rfc6749\parameters.py", line 386, in validate_token_param
eters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.

and this is how I'm trying:

authd_client = fitbit.Fitbit("ID", 'secret',
access_token=ACCESS_TOKEN, refresh_token=REFRESH_TOKEN)

authd_client.client.refresh_token()

I would like to know if it is a bug or what is my mistake here.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions