Access Tokens
To use any of Mapbox's tools, APIs, or SDKs, you'll need a Mapbox access token. You learn the basics about access tokens, such as creating new tokens or deleting existing ones by following the Getting Started Token Guide. This guide covers more advanced topics, like scopes, token rotation, etc.
There are two main types of tokens:
- Public Tokens - for use in client-side applications
- Secrets Tokens - for use in server-side applications
Public Tokens
Public tokens are designed to be used in client-side applications, meaning they can be safely exposed in web browsers, mobile apps, and other client environments.
They typically have limited permissions to access resources like tilesets, styles, datasets, and geocoding services. Public tokens restrict users from changing, deleting, or creating resources, granting only read access.
These tokens are ideal for applications where you expect end users to interact with Mapbox maps (e.g., displaying a map in a mobile or web app) without needing administrative privileges.
Since they are exposed in the client, they are considered less secure than private tokens. They should be configured with the least amount of access necessary to limit exposure.