API Reference
Authentication
Learn how to authenticate with the Mapsemble API.
API Authentication
The Mapsemble API uses API keys (Bearer tokens) for authentication. All API requests must be authenticated unless otherwise noted.
There are two authentication methods:
- API Key (Bearer Token): for server-to-server API calls
- OAuth2 Client Credentials: for application-level access
Getting your API key
- Log in to your Mapsemble account
- Go to Account Settings
- Navigate to the API Keys section
- Click Generate New Key
- Copy the key immediately — it won't be shown again
Using your API key
Include the key in the Authorization header:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://app.mapsemble.com/api/v1/maps
OAuth2 Client Credentials
For application integrations, Mapsemble supports OAuth2 client_credentials flow:
- Register an OAuth2 application in your account settings
- Use the client ID and secret to request an access token
- Use the access token as a Bearer token in API requests
Authentication errors
401 Unauthorized: missing or invalid API key403 Forbidden: valid key but insufficient permissions (e.g., accessing another user's map)
Security best practices
- Never expose your API key in client-side code. Always make API calls from your server.
- Rotate keys regularly. Revoke compromised keys immediately.
- Use environment variables to store keys, not hardcoded values.
- Each API key is scoped to your account — it can access all your maps.