Troubleshooting Access Tokens
This troubleshooting page will walk you through the common mistakes when making tokens and common token errors.
If you are using the Tokens API instead of managing tokens from your account page, view the Token API Errors table instead.
Why can't I edit my secret token?
Mapbox does not allow editing of secret tokens for security reasons. You will need to create a new secret token instead.
Should I use a public or secret token?
For most use cases where you are reading resources from Mapbox (such as loading a map or performing location searches), you will use a public token. Secret tokens are usually required for uses that require writing data, such as creating Mapbox Tiling Services recipes, uploading data, or writing a style. Consult the documentation for the product(s) you are using to determine which type of access token is required.
To learn more about the difference between public and private tokens, view the token guide
Token Errors
401 (Unauthorized)
If your token is deleted or if you've refreshed your default public token and are using an old token, you may receive an error status of 401.
Make sure you are using a token that is still active. You can check which tokens are active by going to your account's access token list in your account.