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.
A public, published dataset needs no authentication. Any other dataset needs a caller with access to it, and answers 404 to everyone else, anonymous callers included, exactly as an unknown dataset does.
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.
tile_url includes sig, exp, and scope in its query string,
so MapLibre can request private tiles without attaching an API key. The
signature expires, and its fields are also returned separately 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.
Not found
Validation error
Internal server error
Service unavailable — the database could not serve the request