credentials for gmailr in production in no interactive mode

I am using gmailr in rstudio server and I need to use it in production in a no interactive mode, so that the script does not keep asking every once a while to enter the authorization code.

I saved the credentials and I retrieve them with the following code:
gm_auth_configure(path = "client.json")
gm_auth(email = TRUE, cache = ".secret")
however, every once a while, I get asked again to enter the authorization code.
How can I avoid that?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.