I'm attempting to get write access to a googlesheet from a shiny app using the "service account token" approach described in https://gargle.r-lib.org/articles/non-interactive-auth.html. In my app, this involves two lines:
googledrive::drive_auth(path = "learnrcache-efcb19f92072.json") passwd_df <- sheets_read(key)
All works well when I am running the app on my development computer [I was wrong here.], but when I deploy to shinyapps.io I get this error:
Error in value[[3L]](cond) : Can't get Google credentials. Are you running googlesheets4 in a non-interactive session? Consider: * `sheets_deauth()` to prevent the attempt to get credentials. * Call `sheets_auth()` directly with all necessary specifics. See gargle's "Non-interactive auth" vignette for more details: https://gargle.r-lib.org/articles/non-interactive-auth.html Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> Execution halted
Any suggestions? I'm trying to create a package for instructors to log events from learnr tutorials in order to support the COVID-19 movement to online learning.