Skip to content

Using Refresh Token to Retrieve New Authentication Token #46

@RyanJPlant

Description

@RyanJPlant

I'm able to use token <- fitbitr::oauth_token() to generate the initial authentication and refresh tokens following browser authentication, however, once the authentication token expires, I can't seem to use the refresh token to generate a new authentication token.

Running token$token$refresh() gives me the following error:

Error in refresh_oauth2.0(self$endpoint, self$app, self$credentials, self$params$user_params,  : 
  Unauthorized (HTTP 401).

Is this feature implemented already, or does the token refresh need to be managed directly by writing the httr code to handle the process? If it isn't, I would say this would be quite an essential update to this wonderful r package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions