Skip to contents

Login to the API

Usage

api_login(host, user, password, role = c("default", "user", "admin"))

Arguments

host

The host of the API

user

The username

password

The password

role

The role of the user. Any of "user" or "admin".

Value

An ApiCredentials object with the login information.

See also

ApiCredentials for the object structure.

api_user_init_password() to set the password.

Examples

if (FALSE) { # \dontrun{
api_login("https://api.example.com", "user", "password", "user")
} # }