Log in with email + password
const url = 'https://api.tovarifinancial.com/auth/login';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tovarifinancial.com/auth/login \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "password": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "email": "hello@example.com", "password": "example"}Responses
Section titled “Responses”Authenticated (tokens issued), OR a second factor is required (challenge returned, no tokens)
object
Authenticated session — tokens issued.
object
Access/ID token lifetime in seconds.
object
object
TRUE when the outstanding policies are a first acceptance rather than an update.
object
Derived from users.email_verified, the sole source of truth for the gate.
object
Seconds the resend button stays disabled after an interactive send.
The session user display-language state (KAN-3773).
object
The per-environment Spanish rollout flag. False ⇒ effectiveLocale is always ‘en’.
The explicit choice; null = use device language.
This request’s X-Client-Locale, else the last-seen device language, else null.
The language to display: ‘en’ when the flag is off, else preference ?? detected ?? ‘en’.
A second factor is required; complete it via POST /auth/mfa.
object
object
The Cognito challenge name, e.g. SOFTWARE_TOKEN_MFA.
Example
{ "data": { "verification": { "status": "verified" }, "language": { "preference": "en", "detected": "en", "effectiveLocale": "en" } }}Validation failed — see errorCode / fieldErrors
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}Missing, invalid, or expired bearer token
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}Internal error (no internal detail leaked)
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}Service temporarily unavailable — errorCode is SERVICE_UNAVAILABLE. A TRANSIENT, RETRYABLE condition rather than a defect in the request: a query that exceeded its time budget, a lost or refused database connection, a saturated connection pool, or an outage at an upstream provider the request depends on (the authentication provider, or the bank data provider on a bank-connection operation). The identical request may succeed on retry — back off briefly and, on a write, resend the same X-Idempotency-Key where the operation accepts one.
object
Machine-readable error code (AUTH_ERROR_CODES).
Optional field-level validation errors, keyed by field name.
object
Example
{ "errorCode": "INVALID_EMAIL_FORMAT"}