Like many, I'm having trouble with the new authentication methods in the latest version of gmailr. After much gnashing of teeth I finally found pointers to how to create an app in google, download the json file, use gm_auth() to get the "secret", and if I run the following code in R studio:
gm_auth_configure(path = "gm_credentials/credentials.json")
gm_auth(email="email@domain.com", cache = ".secrets")
I can run gmailr mail functions successfully from the working directory I run the code in. (gm_credentials and .secrets are subfolders of the working directory). I can also, at that point, run shiny programs that use that working directory, but only locally in R Studio.
However, I cannot get any gmailr functionality working when the apps are run on Shiny Server. I've tried including the above code in the server.R file ("cannot get google credentials") and a million other things. I'm at a loss for what additional stuff needs to be added to satisfy the server.
Does anyone have a recipe for how to get gmailr to authenticate that works in the Shiny Server environment?
Thanks
..