If you use Mapbox as your map service, WP Store Locator needs a Mapbox access token.
One token covers everything the plugin does with Mapbox: the map itself, the address search
that turns a search term into coordinates, the address autocomplete, and driving directions.
Create the token
Create a token specifically for the WP Store Locator plugin rather than using the default public token
Mapbox already made for you. That token is shared with anything else you build on Mapbox, so the
URL restrictions you add in step 5 would follow it everywhere and break those other uses.
- Sign up for a free account at mapbox.com, or sign in if you already have one.
- Go to the create a token page.
- Give the token a name such as WP Store Locator, so you can recognise it later.
- Leave the default public scopes selected. WP Store Locator does not need any of the others.
- Under URL restrictions, add the hostname from your site (e.g. https://mydomain.com).

- Click Create token, then copy the token. It starts with `pk.`
restrictions are the only thing stopping someone from copying it and running up usage on your
Mapbox account.
Add the token to WP Store Locator
- Go to WP Store Locator > Settings > API.
- Make sure Mapbox is selected as the map service.
- Paste the token into the Mapbox API key field.
- Click Show response next to Validate API key.

WP Store Locator tests the token against the Mapbox API and tells you straight away whether
it works. Save the settings once it validates.
You’ll also be asked for the token during the setup wizard, if you pick Mapbox there.
Troubleshooting
Invalid Token or a 401 error
The token is wrong. It’s usually a copy/paste problem — a missing character, or a space
picked up at the beginning or end. Copy it again from the Mapbox console, or create a new token and paste that.
403 Forbidden
The token itself is fine, but Mapbox is refusing to use it here. Nearly always this is a URL
restriction that doesn’t cover the address the map is running on. Check the restrictions on
the token in the Mapbox console and make sure your site’s URL is listed exactly as visitors
reach it.
The map is blank, or search returns nothing
Confirm the token validates under Settings > API > Show Response first. If it does, check your usage in
the Mapbox console. Requests are rejected once a free account passes its included limit.
Costs
Mapbox includes a generous free allowance every month and bills only above it. Map loads,
geocoding requests and directions requests are each counted separately.
See Mapbox pricing for current limits and rates.