credentials_service_account

0th

Percentile

Load a service account token

Load a service account token

Usage
credentials_service_account(scopes = NULL, path = "", ...)
Arguments
scopes

A character vector of scopes to request. Pick from those listed in OAuth 2.0 Scopes for Google APIs.

For certain token flows, the "https://www.googleapis.com/auth/userinfo.email" scope is unconditionally included. This grants permission to retrieve the email address associated with a token; gargle uses this to index cached OAuth tokens. This grants no permission to view or send email. It is considered a low value scope and does not appear on the consent screen.

path

JSON identifying the service account, in one of the forms supported for the txt argument of jsonlite::fromJSON() (typically, a file path or JSON string).

...

Additional arguments passed to all credential functions.

Value

An httr::TokenServiceAccount or NULL.

See Also

Other credential functions: credentials_app_default, credentials_gce, credentials_user_oauth2, token_fetch

Aliases
  • credentials_service_account
Examples
# NOT RUN {
token <- credentials_service_account(
  scopes = "https://www.googleapis.com/auth/userinfo.email",
  path = "/path/to/your/service-account.json"
)
# }
Documentation reproduced from package gargle, version 0.1.3, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.