Get Tile Token
const url = 'https://example.com/tiles/token/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/tiles/token/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/Generate a tile token for a dataset.
For vector datasets: returns HMAC-signed token (sig, exp, scope, expires_in). For raster datasets: returns tile URL template and metadata.
Both responses include a discriminated kind field.
Public datasets can be accessed without authentication. Private/restricted datasets require authentication and RBAC checks.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
object
A raster tile template, signed like its vector sibling.
fix(#688): the raster shape used to carry no signature at all, so a client
following the API contract literally received an unauthenticated template
for a private raster. MapLibre issues the tile image requests itself and
attaches no X-Api-Key, so an API-key-only client could not render one —
the workarounds were setTransformRequest (not available to every consumer)
or ?api_key= in the tile URL, which puts a non-expiring unscoped
credential into tile URLs, server logs, and saved client project files.
tile_url now arrives with sig/exp/scope already in its query string,
so the template is self-sufficient and expires. The three are also returned
as fields, mirroring VectorTileToken, for clients that rebuild the URL.
object
Example
{ "kind": "vector"}Bad request — invalid query parameters or payload
Unauthenticated — a credential was supplied and could not be resolved (expired, revoked, or malformed). Sending no credential at all is not an error on these operations; they answer anonymously with the public subset. Neither is sending an unresolvable credential alongside a capability that authorizes the request on its own — a valid X-Embed-Token or a valid signed tile template (sig, exp, scope). Those are served and the unrelated credential is ignored.
Not found
Validation error
Internal server error
Service unavailable — the database could not serve the request