googlesheets
googlesheets
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 googlesheets
access to user data for Google Spreadsheets and
Google Drive. 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.gs_auth(token = NULL, new_user = FALSE,
key = getOption("googlesheets.client_id"),
secret = getOption("googlesheets.client_secret"),
cache = getOption("googlesheets.httr_oauth_cache"), verbose = TRUE)
.rds
fileFALSE
. Set to TRUE
if you
want to wipe the slate clean and re-authenticate with the same or different
Google account. This deletes the .httr-oauth
file in current working
directory.googlesheets
packagegooglesheets
should cache
credentials in the default cache file .httr-oauth
Token2.0
,
invisibly.rds
file.rds
file or pre-existing object in the
workspace.httr-oauth
In a call to gs_auth
, the user can provide the token, app key and
secret explicitly and can dictate whether credentials will be cached in
.httr_oauth
. If unspecified, these arguments are controlled via
options, which, if undefined at the time googlesheets
is loaded, are
defined like so:
[object Object],[object Object],[object Object]
To override these defaults in persistent way, predefine one or more of
them with lines like this in a .Rprofile
file:
options(googlesheets.client_id = "FOO",
googlesheets.client_secret = "BAR",
googlesheets.httr_oauth_cache = FALSE)
See Startup
for possible locations for this file and the
implications thereof.
More detail is available from