{"action":"closed","issue":{"url":"https://api.github.com/repos/orcasgit/python-fitbit/issues/75","labels_url":"https://api.github.com/repos/orcasgit/python-fitbit/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/orcasgit/python-fitbit/issues/75/comments","events_url":"https://api.github.com/repos/orcasgit/python-fitbit/issues/75/events","html_url":"https://github.com/orcasgit/python-fitbit/issues/75","id":124565771,"number":75,"title":"Refresh token","user":{"login":"cc7768","id":1828449,"avatar_url":"https://avatars.githubusercontent.com/u/1828449?v=3","gravatar_id":"","url":"https://api.github.com/users/cc7768","html_url":"https://github.com/cc7768","followers_url":"https://api.github.com/users/cc7768/followers","following_url":"https://api.github.com/users/cc7768/following{/other_user}","gists_url":"https://api.github.com/users/cc7768/gists{/gist_id}","starred_url":"https://api.github.com/users/cc7768/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cc7768/subscriptions","organizations_url":"https://api.github.com/users/cc7768/orgs","repos_url":"https://api.github.com/users/cc7768/repos","events_url":"https://api.github.com/users/cc7768/events{/privacy}","received_events_url":"https://api.github.com/users/cc7768/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-01T23:01:00Z","updated_at":"2016-01-02T00:10:24Z","closed_at":"2016-01-02T00:10:24Z","body":"After my token expired, I was unable to refresh it. Seems related to how the `requests-oauthlib` package is being called.\r\n\r\nI will probably look at this again later -- though today is my first time interacting with oauth so I don't know how much help I'll be. Will update if I learn more.\r\n\r\n```\r\nIn [68]: uc.client.refresh_token()                                                                                                                                     \r\n---------------------------------------------------------------------------\r\nMissingTokenError                         Traceback (most recent call last)\r\n<ipython-input-68-b899b2fcc311> in <module>()\r\n----> 1 uc.client.refresh_token()\r\n\r\n/home/chase/Documents/Personal/colemanfitbitcompetition/python-fitbit/fitbit/api.py in refresh_token(self)\r\n    290             self.refresh_token_url,\r\n    291             refresh_token=self.token['refresh_token'],\r\n--> 292             headers=headers)\r\n    293         return self.token\r\n    294 \r\n\r\n/home/chase/Programming/anaconda3/envs/cfbc/lib/python3.5/site-packages/requests_oauthlib/oauth2_session.py in refresh_token(self, token_url, refresh_token, body, auth, timeout, headers, verify, **kwargs)\r\n    297             r = hook(r)\r\n    298 \r\n--> 299         self.token = self._client.parse_request_body_response(r.text, scope=self.scope)\r\n    300         if not 'refresh_token' in self.token:\r\n    301             log.debug('No new refresh token given. Re-using old.')\r\n\r\n/home/chase/Programming/anaconda3/envs/cfbc/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/clients/base.py in parse_request_body_response(self, body, scope, **kwargs)\r\n    407         .. _`Section 7.1`: http://tools.ietf.org/html/rfc6749#section-7.1\r\n    408         \"\"\"\r\n--> 409         self.token = parse_token_response(body, scope=scope)\r\n    410         self._populate_attributes(self.token)\r\n    411         return self.token\r\n\r\n/home/chase/Programming/anaconda3/envs/cfbc/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/parameters.py in parse_token_response(body, scope)\r\n    374 \r\n    375     params = OAuth2Token(params, old_scope=scope)\r\n--> 376     validate_token_parameters(params)\r\n    377     return params\r\n    378 \r\n\r\n/home/chase/Programming/anaconda3/envs/cfbc/lib/python3.5/site-packages/oauthlib/oauth2/rfc6749/parameters.py in validate_token_parameters(params)\r\n    384 \r\n    385     if not 'access_token' in params:\r\n--> 386         raise MissingTokenError(description=\"Missing access token parameter.\")\r\n    387 \r\n    388     if not 'token_type' in params:\r\n\r\nMissingTokenError: (missing_token) Missing access token parameter.\r\n```"}}