token_fetch | R Documentation |
This is a rather magical function that calls a series of concrete
credential-fetching functions, each wrapped in a tryCatch()
.
token_fetch()
keeps trying until it succeeds or there are no more functions
to try. See the vignette("how-gargle-gets-tokens")
for a full description
of token_fetch()
.
token_fetch(scopes = NULL, ...)
scopes |
A character vector of scopes to request. Pick from those listed at https://developers.google.com/identity/protocols/oauth2/scopes. For certain token flows, the
|
... |
Additional arguments passed to all credential functions. |
An httr::Token
(often an instance of something
that inherits from httr::Token
) or NULL
.
cred_funs_list()
reveals the current registry of
credential-fetching functions, in order.
Other credential functions:
credentials_app_default()
,
credentials_byo_oauth2()
,
credentials_external_account()
,
credentials_gce()
,
credentials_service_account()
,
credentials_user_oauth2()
## Not run:
token_fetch(scopes = "https://www.googleapis.com/auth/userinfo.email")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.