POST
/
v1
/
auth
/
login
Log in
curl --request POST \
  --url https://api.next.orenda.finance/v1/auth/login \
  --header 'Content-Type: application/json' \
  --header 'x-program-id: <x-program-id>' \
  --data '
{
  "email": "ada.lovelace@example.com",
  "password": "S3cur3-P@ssw0rd!"
}
'
import requests

url = "https://api.next.orenda.finance/v1/auth/login"

payload = {
"email": "ada.lovelace@example.com",
"password": "S3cur3-P@ssw0rd!"
}
headers = {
"x-program-id": "<x-program-id>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-program-id': '<x-program-id>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'ada.lovelace@example.com', password: 'S3cur3-P@ssw0rd!'})
};

fetch('https://api.next.orenda.finance/v1/auth/login', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.next.orenda.finance/v1/auth/login",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'ada.lovelace@example.com',
'password' => 'S3cur3-P@ssw0rd!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-program-id: <x-program-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.next.orenda.finance/v1/auth/login"

payload := strings.NewReader("{\n \"email\": \"ada.lovelace@example.com\",\n \"password\": \"S3cur3-P@ssw0rd!\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-program-id", "<x-program-id>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.next.orenda.finance/v1/auth/login")
.header("x-program-id", "<x-program-id>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"ada.lovelace@example.com\",\n \"password\": \"S3cur3-P@ssw0rd!\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.next.orenda.finance/v1/auth/login")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-program-id"] = '<x-program-id>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"ada.lovelace@example.com\",\n \"password\": \"S3cur3-P@ssw0rd!\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "authenticated": false,
    "challenge": "SOFTWARE_TOKEN_MFA",
    "session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b"
  }
}
Send the user’s email and password. The response is always a challenge, never tokens — even with the correct password you get the next step to complete. Read the challenge field and follow the matching row in the table below; completing that step is what gives you tokens.
Prefer passkey sign-in where you can — it’s our recommendation. This password flow is the fallback.
A login reply looks like this:
{
  "success": true,
  "data": {
    "authenticated": false,
    "challenge": "SOFTWARE_TOKEN_MFA",
    "session_token": "a1b2c3..."
  }
}
authenticated is always false here — login hands you a challenge to complete, never tokens directly. You get tokens from the step that the challenge points you to.

What each challenge means

challengeWhat it meansWhat you do next
SOFTWARE_TOKEN_MFAThe user has 2FA on.Call Complete 2FA with the session_token and their 6-digit code.
EMAIL_VERIFICATION_REQUIREDTheir email needs verifying before they can continue.Verify the email with the code we sent, then continue to security setup.
NEW_PASSWORD_REQUIREDThey logged in with a temporary password.Send them to Change a temporary password, then continue to security setup. session_token is empty here.
The email-verification and temporary-password paths don’t end at those steps — both finish with a SECURITY_SETUP_REQUIRED challenge, where the user sets up a passkey or 2FA before any tokens are issued. See Complete security setup.
Some challenges carry a session_token and some don’t. The sessionless one (NEW_PASSWORD_REQUIRED) just sends the user to a flow that starts fresh with their email — you don’t pass a token along.
Too many wrong passwords locks the account, and you’ll get a 423 with code USER_LOCKED.

Headers

x-program-id
string
required

Identifies the program. Can also be sent as the programId query parameter.

Body

application/json
email
string<email>
required
password
string
required

Response

The next challenge to complete (login never returns tokens directly)

success
boolean
Example:

true

data
object

Login never returns tokens directly — it always returns the next challenge to complete. Read challenge and follow the matching step; complete it to receive tokens.