Authentication
NativeMessage supports two authentication methods: JWT Bearer tokens for user-based access and API keys for server-to-server integrations.JWT Bearer Token
JWT authentication provides short-lived access tokens with automatic refresh capabilities. Best for applications requiring user-level permissions.Login Flow
Obtain an access token by providing username and password:Using Access Tokens
Include the access token in theAuthorization header:
Token Refresh
Access tokens expire after 15 minutes. Use the refresh token to obtain a new access token:Token Lifecycle
- Access Token: Valid for 15 minutes
- Refresh Token: Valid for 7 days
- Refresh tokens can be used multiple times until expiration
API Key Authentication
API keys provide persistent authentication for server-to-server integrations without token management overhead.Creating an API Key
- Log in to the NativeMessage dashboard
- Navigate to Settings → API Keys
- Click “Generate New Key”
- Copy and securely store the key (shown only once)
Using API Keys
Include the API key in theX-API-Key header:
API keys inherit the permissions of the user who created them and remain valid until explicitly revoked.
Rate Limiting
All API requests are subject to rate limits of 200 requests per minute per tenant.Rate Limit Headers
Each response includes rate limit information:X-RateLimit-Limit: Maximum requests per minuteX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Unix timestamp when the limit resets
Best Practices
Secure Storage
Store tokens and API keys in environment variables or secure vaults, never in source code
Token Refresh
Refresh JWT access tokens proactively before expiration to avoid interruptions
Server-to-Server
Use API keys for automated systems and background processes
Key Rotation
Rotate API keys periodically and revoke unused keys immediately