mapbox-token-security

Manage Mapbox access tokens with scopes, URL restrictions, rotation, and storage.

72|14|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-token-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mapbox-token-security
Source: https://github.com/mapbox/mapbox-agent-skills/tree/main/skills/mapbox-token-security
Command: npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-token-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams securely manage Mapbox access tokens, reducing the risk of exposure, misconfiguration, and unauthorized usage across client and server environments.

Core Features & Use Cases

  • Understand token types (public pk., secret sk., and temporary tk.*) and when to use each.
  • Define safe scopes, apply URL restrictions, and implement rotation and secure storage practices.
  • Use cases include client-side apps, server-side services, deployment workflows, and security/compliance audits.

Quick Start

  • Define public vs secret token usage for your app.
  • Enable URL restrictions on all public tokens.
  • Store secret tokens in environment variables and rotate regularly.

Frequently Asked Questions about mapbox-token-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely manage Mapbox access tokens in a web application?

Securely manage Mapbox tokens by applying minimum scopes and URL restrictions to public pk.* tokens, while storing secret sk.* tokens in environment variables to prevent unauthorized exposure.

What is the difference between public, secret, and temporary Mapbox tokens?

Mapbox token types include public pk.* tokens for client-side apps, secret sk.* tokens for server-side services, and temporary tk.* tokens, each requiring distinct scopes and storage practices for secure management.

How do I set up URL restrictions for Mapbox public tokens?

Configure URL restrictions for public pk.* tokens by defining allowed domains in your Mapbox account, ensuring client-side tokens cannot be reused on unauthorized websites during deployment.

When should I rotate Mapbox secret tokens?

Rotate Mapbox secret sk.* tokens regularly during security audits and incident response, updating the stored environment variables to maintain secure secret management practices.

What are the minimum scopes needed for Mapbox token security?

Minimum scopes for Mapbox token security require assigning only the permissions necessary for your specific deployment or development scenario, limiting access for both client-side and server-side tokens.