Authenticate user with email and password to obtain an access token
mode=api in OAuth flow, this step authenticates the user to get an access token needed for Step 3Authorization: Bearer header for authenticated API requests.
mode=api). The hosted UI handles authentication automatically.true to route requests to the US backend environmentDefault: false (international environment)SecurePassword123!POST /v1/auth/login/otp first to send the OTP code to the user’s phoneLength: 6 digitsExample: 123456Authorization: Bearer header for authenticated endpointsExpiry: 6 hoursExample: US_b6b9168a-bb56-4c6a-9c0d-4650ea74f5f9b6b9168c-bb56-4c6a-9c0d-4650ea74f5f9true, you must:POST /v1/auth/login/otp to send OTP codeotpCode parameterfalseisOtpRequired is true)Example: +445*****225ACCOUNTPHONE_NUMBERPERSONAL_INFORMATIONPHYSICAL_ADDRESSMAILING_ADDRESSnullUNVERIFIED - No verification submittedPENDING - Verification in progressVERIFIED - Successfully verifiedREJECTED - Verification failedVERIFIEDfalse means authorization hasn’t been granted yetExample: false400 Bad Request - Invalid Credentials
400 Bad Request - OTP Required
POST /v1/auth/login/otp first, then retry with otpCode422 Validation Error
phase is not null, the user hasn’t completed registration. Guide them through the remaining onboarding steps before allowing full access.httpOnly cookies or secure sessionStorage| accessToken | isOtpRequired | phase | Action Required |
|---|---|---|---|
| non-null | false | null | Success: Store token, proceed with API calls |
| null | true | null | OTP Flow: Call /v1/auth/login/otp, collect code, retry with otpCode |
| null | false | non-null | Onboarding: Direct user to complete registration at specified phase |
| non-null | false | non-null | Partial Onboarding: Token valid but registration incomplete |
accessToken securely (sessionStorage, secure storage)Authorization: Bearer header for all API callsisLinked: false and long-lived access needed, initiate OAuth flowaccessToken is null:
The token won’t be issued until OTP verification completes. This prevents unauthorized access even if credentials are compromised.
Client Action:
POST /v1/auth/login/otp with userId to send OTPphoneNumber so user knows where to checkPOST /v1/auth/login with credentials + otpCode parameterACCOUNT: Basic account creation (email/password set)PHONE_NUMBER: Phone verification requiredPERSONAL_INFORMATION: Name, DOB, SSN collectionPHYSICAL_ADDRESS: Residential address informationMAILING_ADDRESS: Mailing address (if different from physical)accessToken is nullphase will be null and accessToken will be providedemail must be a valid email: Invalid email formatpassword is required: Missing password fieldotpCode must be 6 digits: Invalid OTP code formataccessToken and phase:
Test Case 1: Successful Login
accessToken returnedisOtpRequired: falsephase: nullTest Case 2: OTP Flow
isOtpRequired: trueaccessTokenTest Case 3: Invalid Credentials
Test Case 4: User Onboarding
accessToken: nullphase: "PHONE_NUMBER" (or other phase)Test Case 5: Account Locked