Skip to main content

Authentication

The API Gateway (api.timepointai.com) is the auth authority for the Timepoint ecosystem. It owns JWT issuance, OAuth provider integration, API key validation, and credit management. Backend services like Flash have auth disabled and trust identity headers from the Gateway.

Auth Schemes

Bearer JWT (End Users)

The Gateway issues JWTs via OAuth sign-in (Apple, Google, GitHub) and demo auth flows. Consumer apps send the JWT as a Bearer token to the Gateway, which validates it and proxies requests to backend services with an X-User-ID header.

API Keys (External Developers)

API keys are validated by the Gateway. They function like Bearer tokens for programmatic access:

X-Service-Key (Service-to-Service)

Used for direct service-to-service calls between backend services. Service keys are configured per-service via environment variables.

X-Admin-Key (Admin Operations)

Used for privileged admin operations on backend services. Admin keys are configured per-service via environment variables.

OAuth Providers

The Gateway supports three OAuth providers for end-user authentication: All OAuth flows go through the Gateway’s /api/v1/auth/* endpoints, which issue Gateway JWTs upon successful authentication.

Public Access (No Auth)

The Clockchain public API requires no authentication:

Gateway Proxy Pattern

When a consumer request hits the Gateway:
  1. Client sends Authorization: Bearer <jwt> to api.timepointai.com
  2. Gateway validates the JWT and extracts the user identity
  3. Gateway proxies the request to the appropriate backend service
  4. Backend services are internal only and not directly accessible to consumers

Gateway-Native Endpoints

These endpoints are handled directly by the Gateway (not proxied to any backend):

Getting Access

Service keys are currently available via the developer preview program. Sign up at timepointai.com.

Health Check

All services expose unauthenticated health endpoints: