Skip to contents

Store your Mobility Database API refresh token for use in subsequent API calls. The refresh token is used to generate short-lived access tokens automatically.

Usage

mobdb_set_key(refresh_token, install = FALSE)

Arguments

refresh_token

A string. Your Mobility Database API refresh token. Obtain this by signing up at https://mobilitydatabase.org and navigating to your account details page.

install

A logical. If TRUE, will set the token in .Renviron for use across sessions. If FALSE (default), token is only set for the current session.

Value

Invisibly returns TRUE if successful.

Examples

# \donttest{
# Set token for current session
mobdb_set_key("your_refresh_token_here")
#>  Refresh token set for current session.
#>  Use `install = TRUE` to save permanently.
# }
if (FALSE) {
# Set token permanently in .Renviron
mobdb_set_key("your_refresh_token_here", install = TRUE)
}