mobdb_set_key: Set Mobility Database API refresh token

View source: R/utils-auth.R

mobdb_set_keyR Documentation

Set Mobility Database API refresh token

Description

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


# Set token for current session
mobdb_set_key("your_refresh_token_here")


## Not run: 
# Set token permanently in .Renviron
mobdb_set_key("your_refresh_token_here", install = TRUE)

## End(Not run)

mobdb documentation built on Aug. 29, 2026, 1:07 a.m.