Get a user's API key

get_user_key(user, password, server = Sys.getenv("DATAVERSE_SERVER"), ...)

Arguments

user

A character vector specifying a Dataverse server username.

password

A character vector specifying the password for this user.

server

The Dataverse instance. See get_file.

...

Additional arguments passed to an HTTP request function, such as GET, POST, or DELETE. See use_cache for details on how the R dataverse package uses disk and session caches to improve network performance.

Value

A list.

Details

Use a Dataverse server's username and password login to obtain an API key for the user. This can be used if one does not yet have an API key, or desires to reset the key. This function does not require an API key argument to authenticate, but server must still be specified.

Examples

if (FALSE) { # \dontrun{
 # Replace Username and password with personal login
 get_user_key("username", "password", server = "dataverse.harvard.edu")
} # }