This is the final object in the OAuth dance - it encapsulates the app,
the endpoint, other parameters and the received credentials. It is a
reference class so that it can be seamlessly updated (e.g. using
$refresh()
) when access expires.
oauth2.0_token( endpoint, app, scope = NULL, user_params = NULL, type = NULL, use_oob = getOption("httr_oob_default"), oob_value = NULL, as_header = TRUE, use_basic_auth = FALSE, cache = getOption("httr_oauth_cache"), config_init = list(), client_credentials = FALSE, credentials = NULL, query_authorize_extra = list() )
endpoint | An OAuth endpoint, created by |
---|---|
app | An OAuth consumer application, created by
|
scope | a character vector of scopes to request. |
user_params | Named list holding endpoint specific parameters to pass to the server when posting the request for obtaining or refreshing the access token. |
type | content type used to override incorrect server response |
use_oob | if FALSE, use a local webserver for the OAuth dance.
Otherwise, provide a URL to the user and prompt for a validation
code. Defaults to the of the |
oob_value | if provided, specifies the value to use for the redirect_uri
parameter when retrieving an authorization URL. Defaults to "urn:ietf:wg:oauth:2.0:oob".
Requires |
as_header | If |
use_basic_auth | if |
cache | A logical value or a string. |
config_init | Additional configuration settings sent to
|
client_credentials | Default to |
credentials | Advanced use only: allows you to completely customise token generation. |
query_authorize_extra | Default to |
A Token2.0
reference class (RC) object.
See Token()
for full details about the token object, and the
caching policies used to store credentials across sessions.
Other OAuth:
oauth1.0_token()
,
oauth_app()
,
oauth_endpoint()
,
oauth_service_token()