Exchange OAuth login code for JWT access and refresh tokens
code query parameter in the callback redirectExpiration: Must be used before the OAuth session expires (10 minutes from /auth/start)/auth/start.Validation: 43-128 characters (per OAuth 2.0 PKCE spec)Security: The API computes SHA256(codeVerifier) and compares it to the stored code challenge. Mismatches are rejected.JWT_ACCESS_TTL_MINUTES)Usage: Include in Authorization: Bearer <accessToken> headerPayload:REFRESH_TTL_DAYS)Storage: Store securely; required for POST /v1/auth/refreshSecurity: Single-use only - each refresh revokes this token and issues a new pairDate.now() + expiresInSec * 1000| Code | HTTP Status | Description |
|---|---|---|
INVALID_LOGIN_CODE | 400 | Login code not found or missing user context |
LOGIN_CODE_USED | 400 | Login code has already been exchanged |
LOGIN_CODE_EXPIRED | 400 | OAuth session expired (>10 minutes) |
INVALID_CODE_VERIFIER | 400 | PKCE code verifier does not match stored challenge |
USER_NOT_FOUND | 404 | User record not found (internal error) |
INVALID_INPUT | 400 | Request body validation failed |
RATE_LIMIT_EXCEEDED | 429 | Too many requests within the time window |
/auth/start request (and generated the original codeVerifier) can exchange the login code.