I'm trying to figure out what would be the method to automatically allow the googlesheet4 package to choose my pre - authorized account to modify a particular google sheet.
For example - I want to run the following once a day -
library(googlesheets4)
gs4_auth("xyz@gmail.com")
ss<-sheet_write(table, ss="sheeturl", sheet= "CW24")
When I run the code, after gs4_auth() a browser window opens and asks to confirm (manually) that Tidyverse can access to my email. Would it be possible to pre-authorize my account, so to avoid any manual interference?
I would like to run the code also when my laptop is switched off, so ideally I need to pre-authorize my account in a new session.
A similar question was done here, but in the solution proposed here works only in an already existing session: the first time you need to authorize your email manually, then it works automatically with gs4_auth().
In additon, gs4_auth() was modified in the latest googlesheet4 update and now requires to authorize manually your email whenever you run gs4_auth().
I have also looked here, here, here and in many other pages but I could not solve it. Thanks in advance for your help!