mb_access_token | R Documentation |
See the Mapbox API documentation for more information on access tokens and token scopes.
mb_access_token(token, overwrite = FALSE, install = FALSE)
get_mb_access_token(
token = NULL,
default = c("MAPBOX_PUBLIC_TOKEN", "MAPBOX_SECRET_TOKEN"),
secret_required = FALSE
)
list_tokens(
username,
default = NULL,
limit = NULL,
sortby = "created",
usage = NULL,
access_token = NULL
)
token |
A Mapbox access token; can be public (starting with 'pk') or secret (starting with 'sk') scope, which the function will interpret for you. |
overwrite |
Whether or not to overwrite an existing Mapbox access token.
Defaults to |
install |
if |
default |
If |
secret_required |
If |
username |
The Mapbox username for which you'd like to list access tokens. |
limit |
The maximum number of tokens to return. Defaults to |
sortby |
How to sort the returned tokens; one of |
usage |
If |
access_token |
Your Mapbox access token. If left |
A tibble of information about tokens in your Mapbox account.
## Not run:
my_token <- "..." # The token generated from your Mapbox account
mb_access_token(my_token, install = TRUE)
Sys.getenv("MAPBOX_PUBLIC_TOKEN")
get_mb_access_token()
## End(Not run)
## Not run:
token_list <- list_tokens(
username = "kwalkertcu", # You would use your own username here
limit = 10,
sortby = "modified" #'
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.