--- layout: api title: "v2.1.0 JavaScript Library: API access tokens" categories: api version: v2.1.0 permalink: /api/v2.1.0/api-access-tokens ---

## 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 Apps 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', 'examples.map-8ced9urs', {
       accessToken: '<your access token>'
     });

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