Description Usage Arguments Details Value See Also
View source: R/googleAuthR_auth.R
Authorize 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
grant 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.
1 |
token |
an actual token object or the path to a valid token stored as an
|
new_user |
logical, defaults to |
These arguments are controlled via options, which,
if undefined at the time googleAuthR
is loaded, are
defined like so:
Set to option googleAuthR.client_id
, which defaults to
a client ID that ships with the package
Set to option googleAuthR.client_secret
, which
defaults to a client secret that ships with the package
Set to option googleAuthR.httr_oauth_cache
, which
defaults to TRUE
Set to option 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 .Rprofile
file:
1 2 3 |
See Startup
for possible locations for this file and the
implications thereof.
More detail is available from Using OAuth 2.0 to Access Google APIs. This function executes the "installed application" flow.
an OAuth token object, specifically a
Token2.0
, invisibly
Other authentication functions: gar_attach_auto_auth
,
gar_auth_service
,
gar_auto_auth
, gar_gce_auth
,
get_google_token
,
is_legit_token
, token_exists
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.