Usage
oauth2.0_token(endpoint, app, scope = NULL, user_params = NULL,
type = NULL, use_oob = getOption("httr_oob_default"), as_header = TRUE,
use_basic_auth = FALSE, cache = getOption("httr_oauth_cache"))
Arguments
app
An OAuth consumer application, created by
oauth_app
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 "httr_oob_default"
default,
or TRUE
if httpuv
is not installed.
as_header
If TRUE
, the default, configures the token to add
itself to the bearer header of subsequent requests. If FALSE
,
configures the token to add itself as a url parameter of subsequent
requests.
use_basic_auth
if TRUE
use http basic authentication to
retrieve the token. Some authorization servers require this.
If FALSE
, the default, retrieve the token by including the
app key and secret in the request body.
cache
A logical value or a string. TRUE
means to cache
using the default cache file .oauth-httr
, FALSE
means
don't cache, and NA
means to guess using some sensible heuristics.
A string mean use the specified p