Skip to content

Mapbox Access Token

How to Create a Mapbox Access Token

Official Mapbox Pages

Steps to Create a Mapbox Access Token

  1. Sign in to your Mapbox account.

mapbox

  1. Open your Access Tokens page in the Mapbox account dashboard.

  2. You will already see a default public token available in your account.

  3. To create a new token, click Create a token.

    mapbox

  4. Enter a name for the token so you can identify where it will be used.

  5. Select the required scopes for the token.

    • For most frontend map applications, a public token is used.

    • Public tokens usually start with pk.

    • Secret tokens usually start with sk and should only be used on the server side.

  6. Save or create the token.

    mapbox

  7. Copy the token and store it securely.

Token Types

  • Public token (pk)

    Use this in websites, browser apps, and mobile apps.

  • Secret token (sk)

    Use this only in backend or server-side applications.

  • Temporary token (tk)

    Can be created programmatically for short-lived access through the Tokens API.

Important Recommendations

  • Create separate tokens for different environments such as:

    • local development

    • testing

    • production

  • Only enable the minimum scopes required.

  • Never expose a secret token in frontend code.

  • If a token is exposed publicly and you suspect misuse, rotate it by creating a new one and deleting the old one.

How to Add Mapbox Access Token in AIV

  1. In Viz, add or edit a Map Widget on your canvas.

  2. Select any map in the widget.

  3. Scroll down to the Map Provider section.

  4. In provider options, select Mapbox Access Token.

  5. Paste your token in the Mapbox Access Token input field.

  6. Save the widget settings.

    mapbox

Notes

  • Every request to Mapbox APIs requires an access token.

  • Your account includes a default public token by default.

  • For advanced automation, you can create and manage tokens using the Tokens API.