I'm using below-mentioned code to write the dataframe in Google sheet using R, but getting the following error.
Error: Can't get Google credentials.
Are you running googlesheets4 in a non-interactive session? Consider:
* `gs4_deauth()` to prevent the attempt to get credentials.
* Call `gs4_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
Code that I'm using:
DF
library(googlesheets4)
options(httr_oob_default=TRUE)
write_sheet(DF, "15XfCb-MpRm4jiIn0P3xg40MlIjna2YSfeq4Il0LNPEE", sheet = 'Sheet1')
question from:https://stackoverflow.com/questions/66066922/getting-error-while-writing-data-in-googlesheet-using-r