How it works
Create a service user and generate an API key under IAM → Service Users. The key is scoped to a workspace and environment. When you use it, the platform sends it to the STS (sts.hexelstudio.com) which returns a short-lived Bearer token (valid 15 minutes, refresh token valid 30 days). The SDKs handle this exchange and refresh automatically.
Getting started
- In the Console, go to IAM → Service Users.
- Create a service user and generate an API key.
- Provide the key to a client:
Security
Common mistakes
- Committing keys to version control. Use environment variables or a secret manager.
- One key for all environments. Use a separate key per environment.
- Using API keys in production services. Prefer service accounts with OAuth client credentials.
Best practices
- Rotate keys periodically and immediately if exposed.
- Scope each key to the narrowest workspace and environment needed.
- Never embed keys in client-side or mobile code.
Key rotation procedure
Zero-downtime rotation requires overlapping validity — the old key must work until all consumers have switched.1
Create a new key
In IAM → Service Users, generate a new API key for the same service user, workspace, and environment. Both old and new keys are now valid simultaneously.
2
Update all consumers
Deploy the new key to every service, CI pipeline, and developer environment that uses the old key. Update secret managers, environment variables, and configuration files.
3
Verify traffic on the new key
Monitor logs to confirm requests are authenticating with the new key. Wait at least one full deployment cycle to ensure no consumer still uses the old key.
4
Revoke the old key
In IAM → Service Users, revoke the old key. Revocation takes effect immediately for new token exchanges — any already-issued access token remains valid until its 15-minute expiry.
Related pages
Service Accounts
OAuth credentials for production.
Authentication
How keys become tokens.
Environments
Scope keys per environment.
Members & Roles
Control who can create keys.

