Authenticate Gmailr on a new port

I would like to use in rstudio server gmailr without interactive authorization.
Since I am already using googledrive when I run gm_auth(path = "credentials.json")
I get:
createTcpServer: address already in use

How can I specify a different port for gmailr?

The same issue is reported also here:

For reference, I solved it with the following code:
options(gargle_oauth_cache = ".secrets")
gargle::gargle_oauth_cache()
gm_auth_configure(path = "credentials.json") # this json is obtained here: https://developers.google.com/gmail/api/quickstart/python

gm_auth(cache = gargle::gargle_oauth_cache(), use_oob = TRUE)

The above code needs to be run just once, and then every time using the code I should run:
gm_auth_configure(path = "credentials.json")

options(
gargle_oauth_cache = ".secrets",
gargle_oauth_email = TRUE
)

gm_labels() #to test that it works

Still it would be interesting to know if it is possible to use a different port

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