POST
/
v1
/
auth
/
forgot-password
/
confirm
Finish a password reset
curl --request POST \
  --url https://api.next.orenda.finance/v1/auth/forgot-password/confirm \
  --header 'Content-Type: application/json' \
  --header 'x-program-id: <x-program-id>' \
  --data '
{
  "email": "ada.lovelace@example.com",
  "code": "123456",
  "new_password": "N3w-S3cur3-P@ss!"
}
'
import requests

url = "https://api.next.orenda.finance/v1/auth/forgot-password/confirm"

payload = {
"email": "ada.lovelace@example.com",
"code": "123456",
"new_password": "N3w-S3cur3-P@ss!"
}
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',
code: '123456',
new_password: 'N3w-S3cur3-P@ss!'
})
};

fetch('https://api.next.orenda.finance/v1/auth/forgot-password/confirm', 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/forgot-password/confirm",
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',
'code' => '123456',
'new_password' => 'N3w-S3cur3-P@ss!'
]),
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/forgot-password/confirm"

payload := strings.NewReader("{\n \"email\": \"ada.lovelace@example.com\",\n \"code\": \"123456\",\n \"new_password\": \"N3w-S3cur3-P@ss!\"\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/forgot-password/confirm")
.header("x-program-id", "<x-program-id>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"ada.lovelace@example.com\",\n \"code\": \"123456\",\n \"new_password\": \"N3w-S3cur3-P@ss!\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.next.orenda.finance/v1/auth/forgot-password/confirm")

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 \"code\": \"123456\",\n \"new_password\": \"N3w-S3cur3-P@ss!\"\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "authenticated": true,
    "access_token": "eyJhbGciOi...JWT...access...redacted",
    "id_token": "eyJhbGciOi...JWT...id...redacted",
    "refresh_token": "eyJjdHkiOi...JWT...refresh...redacted",
    "token_type": "Bearer",
    "expires_in": 3600,
    "hasPasskey": true,
    "hasMfa": false
  }
}

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
code
string
required

Reset code from the email.

new_password
string
required
Minimum string length: 8

Response

Tokens, or the next challenge

success
boolean
Example:

true

data
object

Returned when login is fully complete.