oauth_flow_refresh: OAuth flow: refresh token

Description Usage Arguments Value See Also

View source: R/oauth-flow-refresh.R

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

1
2
3
4
5
6
oauth_flow_refresh(
  client,
  refresh_token = Sys.getenv("HTTR_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 HTTR_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()


httr2 documentation built on Sept. 28, 2021, 5:10 p.m.