Skip to content

This function generates an access token from a refresh token, following the process described in rfc6749, Section 6. Errors if the refresh returns a new refresh token, see req_oauth_refresh() for details.

Usage

oauth_flow_refresh(
  client,
  refresh_token = Sys.getenv("HTTR2_REFRESH_TOKEN"),
  scope = NULL,
  token_params = list()
)

Arguments

client

An oauth_client().

refresh_token

A refresh token. This is equivalent to a password so shouldn't be typed into the console or stored in a script. Instead, we recommend placing in an environment variable; the default behaviour is to look in HTTR2_REFRESH_TOKEN.

scope

Scopes to be requested from the resource owner.

token_params

List containing additional parameters passed to the token_url.

Value

An oauth_token.