FastMap provides two authentication methods for accessing its APIs:
Auth0 Authentication (OAuth 2.0)
FastMap supports authentication via Auth0, which follows the OAuth 2.0 protocol. This method is recommended for users who need secure, token-based authentication with granular access control. Users authenticate through Auth0 using their credentials:
curl --request POST --url https://auth.fastmap.ai/oauth/token --header 'content-type: application/json' --data '{"client_id": CLIENT_ID, "client_secret": CLIENT_SECRET, "audience":https://tiles.fastmap.ai/docs, "grant_type":"client_credentials"}
Upon successful authentication, an access token is issued. The token must be included in API requests using the Authorization header:
For example:
curl --request POST --url https://tiles.fastmap.ai/endpoint --header 'accept: application/json' --header 'authorization: Bearer access_token
API Key Authentication
For simpler access, FastMap also allows authentication via API keys to a few map serving endpoints. This method is useful for machine-to-machine communication or when OAuth is not required.
Users generate an API key from their FastMap account (Here). The API key is included in request url as APIKEY parameter:
curl --request POST --url <https://tiles.fastmap.ai/endpoint?APIKEY=YOUR_API_KEY> --header 'accept: application/json'