googleAuthR to access your Google user data. You will be
directed to a web browser, asked to sign in to your Google account, and to
googleAuthR access to user data for Google Search Console.
These user credentials are cached in a file named
.httr-oauth in the current working directory, from where they can be
automatically refreshed, as necessary.
gar_auth(token = NULL, new_user = FALSE)
FALSE. Set to
TRUEif you want to wipe the slate clean and re-authenticate with the same or different Google account. This deletes the
.httr-oauthfile in current working directory.
an OAuth token object, specifically a
These arguments are controlled via options, which,
if undefined at the time
googleAuthR is loaded, are
defined like so:
googleAuthR.client_id, which defaults to a client ID that ships with the package
googleAuthR.client_secret, which defaults to a client secret that ships with the package
googleAuthR.httr_oauth_cache, which defaults to TRUE
googleAuthR.scopes.selected, which defaults to demo scopes.
To override these defaults in persistent way, predefine one or more of
them with lines like this in a
options(googleAuthR.client_id = "FOO", googleAuthR.client_secret = "BAR", googleAuthR.httr_oauth_cache = FALSE)See
Startupfor possible locations for this file and the implications thereof.
More detail is available from https://developers.google.com/identity/protocols/OAuth2. This function executes the "installed application" flow.