Skip to main content
POST
Log in with password
Send authentication requests to https://platform.verolabs.co. Use the resulting JWT for protected REST API requests to https://api-oms.verolabs.co.

Response states

Both states below use HTTP 200. Check status before reading jwt. When two-factor authentication is enabled, password verification alone does not issue a JWT. For example, a pending challenge can return:
methods lists the available methods for this challenge. totp accepts the current six-digit authenticator code. lookup_secret accepts an unused saved backup code. Select a method returned by the API.

Log in with cURL

These Bash examples require curl and jq. Keep the same cookie jar through login and verification. Browser requests must originate from the authentication host; cross-origin requests are rejected.

1. Submit the email and password

If status is authenticated, proceed to step 3. If it is mfa_required, complete step 2 before extracting the JWT.

2. Verify the second factor when required

For totp, read the current six-digit code from your authenticator app. Keep it as a string to preserve leading zeros.
To use a backup code, set MFA_METHOD="lookup_secret" and enter an unused saved backup code instead. Use this option only when lookup_secret is listed in methods. Successful verification consumes that backup code. The successful response has status: "authenticated", a JWT, and authenticator_assurance_level: "aal2" in its session objects. The API clears the pending challenge cookie.

3. Call the REST API with the JWT

sessionToken and jwt serve different purposes. Use jwt for REST API authorization. Keep sessionToken confidential; it can be used to resume an existing session.

Retry and expiration

An incorrect code returns an error; no JWT is issued. You can retry verification while the challenge remains valid. If the API returns HTTP 410, restart login to obtain a new challenge and cookie. Do not reuse a consumed backup code or construct a challenge cookie yourself.

Body

application/json

Email identifier and password credentials.

Password login request. Set identifier to the account email address.

identifier
string
required

Email address associated with the Vero OMS account.

Minimum string length: 1
password
string
required

Current password for the Vero OMS account.

Minimum string length: 1

Response

Authenticated session and JWT, or a pending second-factor challenge. Inspect status.

Check status on every successful HTTP response. authenticated includes the JWT; mfa_required requires POST /api/auth/mfa/verify with the response cookie.

status
enum<string>
required

Indicates that authentication is complete and the JWT can be used.

Available options:
authenticated
sessionToken
string
required

Account session token. Keep it confidential. Use it for session resumption; use jwt for REST API authorization.

jwt
string
required

Bearer JWT for protected REST API requests. Send it as Authorization: Bearer .

session
object
required

Active authenticated session.

identity
object | null
required

Account identity, or null if absent.

tokenizedSession
object
required

Authenticated session containing the JWT in tokenized.