If you already have a token (e.g. from a web browser session), you can set it directly without going through a login flow.
Arguments
- con
A
brapi_connection()object.- token
Character. The Bearer token string.
See also
The "Handling Credentials Safely" section of
vignette("brapiR2") for how to keep token out of your script,
using .Renviron or the keyring package.
Examples
con <- brapi_connection("https://test-server.brapi.org")
con <- brapi_set_token(con, "my_existing_token")
