Skip to contents

Login to the EDI repository


login(userId = NULL, userPass = NULL, config = NULL)



(character) User identifier of an EDI data repository account. If using


(character) Password of userId


(character) Path to config.txt, which contains userId and userPass (see details below)


(character) A temporary (~10 hour) authentication token written to the system variable "EDI_TOKEN".


If userId, userPass, and config are NULL, the console will prompt for credentials.

config: Supplying credentials in a file named config.txt facilitates authentication within automated/unassisted processes. Contents of this file should be new line separated and have the form "<argument> = <value>" (e.g. userId = myname).


Only works when authenticating with EDI credentials. Does not work when authenticating with ORCiD, GitHub, or Google credentials.

Be careful not to accidentally share your userId and userPass. Some tips to avoid this:

  • Don't write code that explicitly lists your credentials.

  • Don't save your workspace when exiting an R session.

  • Do store your credentials as environmental variables and reference these.

  • Do use config but if using version control ensure the config.txt file is listed in your .gitignore.

If you may have shared your credentials, please reset your password at

See also

Other Authentication: logout()


if (FALSE) {

# Interactively at the console
#> User name: "my_name"
#> User password: "my_secret"

# Programmatically with function arguments
login(userId = "my_name", userPass = "my_secret")

# Programmatically with a file containing userId and userPass arguments
login(config = paste0(tempdir(), "/config.txt"))