Exchange a refresh token for fresh tokens
const url = 'https://api.tovarifinancial.com/auth/refresh';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"refreshToken":"example","email":"hello@example.com"}'};
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/refresh \ --header 'Content-Type: application/json' \ --data '{ "refreshToken": "example", "email": "hello@example.com" }'Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "refreshToken": "example", "email": "hello@example.com"}Responses
Section titled “Responses”New tokens issued
object
object
The rotated refresh token, or the one presented when Cognito returns none.
Access/ID token lifetime in seconds.
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.
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’.
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"}