When to Use API Clients vs API Keys
Use API clients for production service-to-service integrations where security is a priority. Use API keys for simpler automation, one-off scripts, and development.
Creating an API Client
API client management requires the
admin role.From the UI
Navigate to Admin > API Clients and click Create Client. Provide a name, description, and select the scopes.From the API
Using an API Client
API clients authenticate using the OAuth2 Client Credentials flow:1
Request an access token
Exchange the client credentials for a JWT access token:Response:
2
Use the token
Pass the access token as a Bearer token in the
Authorization header:3
Refresh before expiration
Tokens expire after 30 minutes (configurable). Your integration should request a new token before the current one expires. There is no refresh token in the Client Credentials flow — simply request a new access token.
Scopes
API clients use the same scope system as API keys:
Scopes are validated at creation time. Invalid scopes are rejected with a
400 error.
Listing API Clients
Regenerating a Secret
If a client secret is compromised or lost, regenerate it:Disabling a Client
Disable a client to revoke all access:- Cannot obtain new tokens
- Existing tokens remain valid until they expire (up to 30 minutes)
- Cannot be re-enabled — create a new client instead
Client Status
Best Practices
- Use descriptive names — Name clients after the integration they serve
- Minimize scopes — Only grant the scopes needed for the specific integration
- Cache tokens — Reuse tokens until near expiration instead of requesting a new one per API call
- Store secrets securely — Use Azure Key Vault or a similar secrets manager
- Monitor last_used_at — Identify and disable unused clients
- Separate clients per environment — Use different clients for dev, staging, and production
