Environment matrix
Set the SDK
environment option or HUMANITY_BASE_URL/HUMANITY_ENVIRONMENT env vars in your application to switch between these hosts. Humanity does not expose a public “local” server; if you need offline testing, stub the HTTP calls in your codebase or use the OpenAPI schema with a mocking tool.
OAuth & authentication
- OAuth 2.1 with PKCE (
code_challenge_method=S256) is required for browser/mobile apps. - Token grants:
authorization_code– exchanged viaPOST /oauth/tokenrefresh_token– same endpoint with the refresh grant body
- Confidential or service-to-service clients receive a
client_secretand may use HTTP Basic auth with the token endpoint (subject to contract). - Session helpers:
POST /oauth/authorize/approveand/denypower advanced consent surfaces.POST /oauth/revokerevokes access/refresh tokens when a user withdraws consent.
- JWKS + discovery documents live under
/.well-known/*so you can validate ID tokens or dynamically discover URLs.
Feature flags & configuration
- Humanity enables features (new preset catalogs, beta endpoints) per client ID. You will receive flag descriptions in your onboarding packet—no repo changes required.
- API responses include
idempotency_keyechoes on POSTs. Reuse the key when retrying to avoid duplicate actions. - All timestamps are ISO-8601 strings in UTC. Persist the
updatedSincecursor returned by feed endpoints to resume polling safely.
Rate limits & resiliency
- OAuth & presets: burst up to 10 requests/second, sustained 60 requests/minute per client ID.
- Feeds (
/credentials,/authorizations): page in batches of ≤500 items and wait at least 2 seconds before refetching the next window. - Retry guidance: use exponential backoff capped at 30 seconds and honor
Retry-Afterheaders on429responses. - Idempotency: POST bodies accept optional
idempotency_keyfields (see schemas in the OpenAPI). Reuse keys on network retries.
Operational endpoints
Integrate these probes and discovery docs into your monitoring stack before promoting workloads to production.