oauth_flow_refresh {httr2}R Documentation

OAuth flow: refresh token

Description

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.

See Also

Other OAuth flows: oauth_flow_auth_code(), oauth_flow_bearer_jwt(), oauth_flow_client_credentials(), oauth_flow_device(), oauth_flow_password()


[Package httr2 version 0.2.2 Index]