Authenticates using the BrAPI /token endpoint and returns an updated
connection object with the Bearer token set.
Arguments
- con
A
brapi_connection()object.- username
Character. Your username.
- password
Character. Your password.
Examples
# \donttest{
con <- brapi_connection("https://test-server.brapi.org")
con <- brapi_login(con, "brapi_reader", "brapi_reader")
#> ✔ Logged in to <https://test-server.brapi.org>
con
#>
#> ── BrAPI Connection
#> • Server: <https://test-server.brapi.org>
#> • Version: v2
#> • Auth: ✓ authenticated
#> • Page size: 1000
#> • Timeout: 120s
#> • Cache: disabled
# }
