View source: R/credentials_service_account.R
credentials_service_account | R Documentation |
Load a service account token
credentials_service_account(scopes = NULL, path = "", ..., subject = 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
|
path |
JSON identifying the service account, in one of the forms
supported for the |
... |
Additional arguments passed to all credential functions. |
subject |
An optional subject claim. Specify this if you wish to use the
service account represented by |
Note that fetching a token for a service account requires a
reasonably accurate system clock. For more information, see the
vignette("how-gargle-gets-tokens")
.
An httr::TokenServiceAccount
or NULL
.
Additional reading on delegation of domain-wide authority:
Other credential functions:
credentials_app_default()
,
credentials_byo_oauth2()
,
credentials_external_account()
,
credentials_gce()
,
credentials_user_oauth2()
,
token_fetch()
## Not run:
token <- credentials_service_account(
scopes = "https://www.googleapis.com/auth/userinfo.email",
path = "/path/to/your/service-account.json"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.