Mapbox
Geocode, route and render maps with your Mapbox access token.
Connect it with: API key. Mapbox's own documentation: https://docs.mapbox.com/api/accounts/tokens/.
What agents can do
Connect Mapbox so the agents working your tasks can reach it. With it connected, they can:
- Geocode addresses and place names, and reverse-geocode coordinates.
- Compute driving, walking or cycling directions and travel-time matrices.
- Render static map images for a report or a page.
- Configure Mapbox GL JS in an app with the right token and style URL.
Before you start
- A Mapbox account (console.mapbox.com). The free tier covers light use; heavier use needs a billing method on the account.
- A Jaah account. Anyone can add a personal secret; an organization secret needs an Org Owner or Admin.
Connect with Mapbox
Jaah connects to Mapbox with an API key, not with a sign-in button.
Connect with an API key
Find each value first:
- Access token: console.mapbox.com > Tokens (account.mapbox.com/access-tokens) > Create a token. Use a public token (pk.) for maps, geocoding and directions; a secret token (sk.) only when agents must manage styles, datasets or tokens, and tick just the scopes they need.
Then add it to Jaah:
- In Jaah, open Secrets, select New, and pick the Mapbox card.
- Name the secret and choose who can use it.
- Fill in Access token.
- Select Save. Jaah tests the secret straight away (see Test the connection).
Jaah encrypts what you type and never shows it again — not to you, and not to an admin.
Use your own OAuth app
Not used: Jaah connects to Mapbox with an API key, not through an OAuth app.
Test the connection
Select Test on the secret. Jaah calls Mapbox's API once (GET https://api.mapbox.com/tokens/v2) with the stored values, and shows who it answered as, or which value Mapbox refused and the status it answered. Jaah also tests automatically when you save or reconnect.
The last result and its time stay on the secret's page, so you can see whether it still works without testing again.
Who can use it
Every secret has an owner, and the owner decides who can use it:
- Personal — only your own tasks can use it. This is the default.
- Organization — every task in the organization can use it. Only Org Owners and Admins can choose this.
- Attached to a project — every task on that project can use it, whoever started the task. See Attach a secret to a project.
More on owners and access: How secrets work.
Use it in an agent session
An agent asks for the secret with its credential_get tool, by the secret's path, when it needs it, and gets the values for that one call. The path is the owner's prefix and the secret's name:
org/<name>for an organization secret,projects/<project>/<name>for one attached to a project,me/<name>for your personal one.
A key connection hands the agent its fields: access_token.
Tell the agent in your task description which secret to use, for example “use the Mapbox secret org/mapbox”.
Manage, rotate or disconnect
Everything is on the secret's page under Secrets:
- Rotate a key: create a new key at the vendor first, then select Replace on the secret and paste it. Revoke the old key at Mapbox once the test passes. Steps: Replace or delete a secret.
- Disconnect: select Delete. The stored values are destroyed and agents lose access on their next call. To end access at Mapbox's side too, revoke or delete the key at Mapbox.
Limitations
- Requests agents make count against your Mapbox account's free tier and are billed beyond it.
- A public token restricted to URLs works only from those web origins; agents call from servers, so use an unrestricted public token or a secret token for them.
- A secret token can do only what its scopes allow; Mapbox shows a secret token once, when it is created.
- Agents can do only what the connected Mapbox account allows.
Troubleshooting
Test says Mapbox rejected the access token (TokenInvalid) or (TokenRevoked)
The token was deleted, rotated or mistyped. Create a token in console.mapbox.com > Tokens and select Replace on the secret.
Test says Mapbox rejected the access token (TokenMalformed)
What was pasted is not a whole token. Tokens start with pk. or sk. and are long; copy it again with the copy button.
An agent gets 403 Forbidden on a styles or datasets call
A public token cannot reach those APIs. Create a secret token with the styles:read or datasets:read scope and replace the secret.
Still stuck? Select Test and read the result: it names the value Mapbox refused and the status it answered.
FAQ
Public or secret token?
Public (pk.) for maps, geocoding and directions; secret (sk.) only for account APIs such as uploads, datasets and token management.
Does the Test cost anything?
No. Jaah calls Mapbox's token check, which is not billed.
Can Jaah or an admin see the key or token?
No. Jaah stores it encrypted and never shows it again. Only the tasks allowed to use the secret receive it, at the moment they ask for it.
Can I connect more than one Mapbox account?
Yes. Add one secret per account, each with its own name, and tell the agent which one to use.