Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

oauth_app_from_json

Create an OAuth app from JSON


Description

Essentially a wrapper around httr::oauth_app() that extracts the necessary info from JSON obtained from Google Cloud Platform Console. If no appname is given, the "project_id" from the JSON is used.

Usage

oauth_app_from_json(path, appname = NULL)

Arguments

path

JSON downloaded from Google Cloud Platform Console, containing a client id (aka key) and secret, in one of the forms supported for the txt argument of jsonlite::fromJSON() (typically, a file path or JSON string).

appname

name of the application. This is not used for OAuth, but is used to make it easier to identify different applications.

Examples

## Not run: 
oauth_app(
  path = "/path/to/the/JSON/you/downloaded/from/gcp/console.json"
)

## End(Not run)

gargle

Utilities for Working with Google APIs

v1.1.0
MIT + file LICENSE
Authors
Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), Craig Citro [aut], Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Google Inc [cph], RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.