Log in EcoTaxa

api_login(username, password, cache = TRUE)

Arguments

username

your EcoTaxa username (i.e. email address).

password

your EcoTaxa password, as text.

cache

whether to store the token in a file, determined by api_token_path(). This is TRUE by default and allows other functions to reuse the token.

Value

The token string, invisibly. It also stores to token string in the file defined by api_token_path() if cache=TRUE (the default).

Examples

# log in and get a token token <- api_login(username="ecotaxa.api.user@gmail.com", password="test!") token
#> [1] "eyJ1c2VyX2lkIjo5OTN9.X_idKw.KpqE5BswtXf6mApEdyYhrgpWYwc"
# check where the token is stored api_token_path()
#> [1] "/home/jiho/.R/ecotaxar/token"
#> [1] "eyJ1c2VyX2lkIjo5OTN9.X_idKw.KpqE5BswtXf6mApEdyYhrgpWYwc"