oauth_service_token

0th

Percentile

Generate OAuth token for service accounts.

Service accounts provide a way of using OAuth2 without user intervention. They instead assume that the server has access to a private key used to sign requests. The OAuth app is not needed for service accounts: that information is embedded in the account itself.

Usage
oauth_service_token(endpoint, secrets, scope = NULL)
Arguments
endpoint
An OAuth endpoint, created by oauth_endpoint
secrets
Secrets loaded from JSON file, downloaded from console.
scope
a character vector of scopes to request.
See Also

Other OAuth: oauth1.0_token; oauth2.0_token; oauth_app; oauth_endpoint

Aliases
  • oauth_service_token
Examples
endpoint <- oauth_endpoints("google")
secrets <- jsonlite::fromJSON("~/Desktop/httrtest-45693cbfac92.json")
scope <- "https://www.googleapis.com/auth/bigquery.readonly"

token <- oauth_service_token(endpoint, secrets, scope)
Documentation reproduced from package httr, version 0.6.1, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.