Suggest/spreadsheet: 21.3 Google Sheets, make gs4_deauth() explicit (#1473)

* make gs4_deauth() explicit

* Update spreadsheets.qmd

* Update spreadsheets.qmd

* Update spreadsheets.qmd

* Update spreadsheets.qmd

---------

Co-authored-by: Mine Cetinkaya-Rundel <cetinkaya.mine@gmail.com>
This commit is contained in:
Mitsuo Shiota 2023-11-09 12:42:25 +09:00 committed by GitHub
parent c8c54c29ff
commit b17cbcf5ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -556,8 +556,6 @@ The first argument to `read_sheet()` is the URL of the file to read, and it retu
These URLs are not pleasant to work with, so you'll often want to identify a sheet by its ID.
```{r}
#| include: false
gs4_deauth()
```
@ -628,7 +626,7 @@ write_sheet(bake_sale, ss = "bake-sale", sheet = "Sales")
### Authentication
While you can read from a public Google Sheet without authenticating with your Google account, reading a private sheet or writing to a sheet requires authentication so that googlesheets4 can view and manage *your* Google Sheets.
While you can read from a public Google Sheet without authenticating with your Google account and with `gs4_deauth()`, reading a private sheet or writing to a sheet requires authentication so that googlesheets4 can view and manage *your* Google Sheets.
When you attempt to read in a sheet that requires authentication, googlesheets4 will direct you to a web browser with a prompt to sign in to your Google account and grant permission to operate on your behalf with Google Sheets.
However, if you want to specify a specific Google account, authentication scope, etc. you can do so with `gs4_auth()`, e.g., `gs4_auth(email = "mine@example.com")`, which will force the use of a token associated with a specific email.