Skip to main content

Authentication Methods

Atlas uses two authentication mechanisms depending on which API you’re calling:

API Key Authentication

Used for all domain event endpoints: /api/v1/user, /api/v1/transaction, /api/v1/casino, /api/v1/sport.

Get Your API Key

  1. Log in to app.atlas.io
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. Name it (e.g., Production - Events) and select the brand
  5. Copy the key — it is only shown once

Use the API Key

Pass the key in the X-API-Key header on every request:

API Key Best Practices

Treat API keys like passwords. Never:
  • Commit them to version control
  • Log them in application logs
  • Expose them in client-side JavaScript
  • Share them across multiple environments (use separate keys per env)
Do:
  • Store in environment variables or a secrets manager (AWS Secrets Manager, HashiCorp Vault)
  • Create separate keys for staging and production
  • Rotate keys periodically (every 90 days recommended)
  • Delete unused keys immediately

API Key Rotation

  1. Create a new key in Dashboard → Settings → API Keys
  2. Deploy your new key to your environment
  3. Verify events are flowing with the new key
  4. Delete the old key
Zero-downtime rotation: both keys work simultaneously until the old one is deleted.

JWT Bearer Authentication

Used for the generic events endpoint (/v1/events) and all Backend API calls.

Obtaining a Token

Response:

Use the JWT Token

Token Lifecycle


Multi-Organization Context

If your user account belongs to multiple organizations, you must select the active organization after login:
This returns a new token scoped to that organization. All subsequent requests should use this organization-scoped token.

Google OAuth

Atlas supports Google login for dashboard access:
  1. Navigate to app.atlas.io/login
  2. Click Continue with Google
  3. Complete Google’s authentication flow
  4. You’ll be redirected to the Dashboard
Google accounts and email/password accounts with the same email address are automatically linked to the same Atlas user. You can use either method to log in.

Error Responses