Skip to main content
A service account is a non-human identity authenticated with OAuth client credentials (client_id and client_secret). It is the recommended way for production services to authenticate to Hexel Studio.

When to use service accounts vs API keys

Use API keys for development. Use service accounts for anything that runs unattended in production — the identity persists regardless of team changes.

How it works

Create an access client under IAM → Service Users, which issues a client_id and client_secret. Your service exchanges them with the STS (sts.hexelstudio.com) for a Bearer token (valid 15 minutes, refresh token valid 30 days). The SDKs handle this exchange and refresh automatically.

Getting started

Common mistakes

  • Using a personal API key in production. Prefer a service account so the credential is not tied to an individual.
  • Storing the secret in code. Keep it in a managed secret store.

Best practices

  • Use one service account per service, scoped to its environment.
  • Rotate client secrets periodically.
  • Revoke unused access clients promptly.

API Keys

Simpler credentials for development.

Authentication

The client-credentials flow.

Environments

Scope service accounts per environment.

Members & Roles

Control who can create service accounts.