API access tokens

Mapbox.js uses the Mapbox web services API, which requires an API access token. You must supply an access token to Mapbox.js:

 L.mapbox.accessToken = '<your access token>';

To obtain an access token, sign in to Mapbox and visit the Account page page. For Mapbox.js, a "Public" token (starting with "pk") is required.

You may create multiple tokens and use different ones for different applications. If necessary, you can use different tokens on the same page by using the accessToken option when creating Mapbox.js objects. For example:

 var map = L.mapbox.map('map', 'mapbox.outdoors', {
   accessToken: '<your access token>'
 });

For additional help, see "How do I create an API access token?".