
- MODX 3
- PHP 8.1


Rotate API keys and OAuth client secrets on a schedule or after a suspected leak. mxHeadless stores hashes only. You cannot recover an old secret from the database.
mxh_*) Format: mxh_{lookupId}_{secret}. In the database: lookup_id, secret_hash, scopes, and optional rate limits.
last_used_on or audit log).revoked = 1).Do not revoke until every caller has switched.
After revoke, Bearer with the old secret returns 401. Cached anonymous GET responses may live until mxheadless_cache_ttl. Lower TTL or disable cache during rotation.
mxt_*) When mxheadless_oauth_enabled=true:
POST /api/v1/auth/token.Access tokens expire after mxheadless_oauth_token_ttl (default 3600 seconds). Changing the client secret blocks new token exchanges. Issued tokens live until expiry.
Secrets live in mxheadless_webhook_subscriptions.secret.
MXHEADLESS_WEBHOOK_SECRET).Pending outbox rows store the secret snapshot at enqueue time.