curl --request POST \
--url https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start \
--header 'Content-Type: application/json' \
--header 'x-program-id: <x-program-id>' \
--data '
{
"session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b",
"friendly_name": "My phone"
}
'import requests
url = "https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start"
payload = {
"session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b",
"friendly_name": "My phone"
}
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({
session_token: '3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b',
friendly_name: 'My phone'
})
};
fetch('https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start', 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/security-setup/passkey/register/start",
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([
'session_token' => '3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b',
'friendly_name' => 'My phone'
]),
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/security-setup/passkey/register/start"
payload := strings.NewReader("{\n \"session_token\": \"3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b\",\n \"friendly_name\": \"My phone\"\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/security-setup/passkey/register/start")
.header("x-program-id", "<x-program-id>")
.header("Content-Type", "application/json")
.body("{\n \"session_token\": \"3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b\",\n \"friendly_name\": \"My phone\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start")
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 \"session_token\": \"3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b\",\n \"friendly_name\": \"My phone\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b",
"publicKey": {
"rp": {
"id": "next.orenda.finance",
"name": "Orenda"
},
"user": {
"id": "dXNlci1jdXN0XzNmOWEyYjdl",
"name": "ada.lovelace@example.com",
"displayName": "Ada Lovelace"
},
"challenge": "q1n9bXJ0c2VjdXJlY2hhbGxlbmdl",
"pubKeyCredParams": [
{
"type": "public-key",
"alg": -7
},
{
"type": "public-key",
"alg": -257
}
],
"timeout": 120000,
"authenticatorSelection": {
"residentKey": "preferred",
"userVerification": "required"
},
"attestation": "none"
}
}
}Set up a passkey (start)
Step 1 of the passkey path for a user finishing a SECURITY_SETUP_REQUIRED challenge. Send the session_token. You get back publicKey creation options to pass to navigator.credentials.create() (or the platform credential API on iOS and Android). No bearer token; this runs before the user has tokens.
For new integrations use POST /v2/auth/security-setup/passkey/register/start, which takes and returns camelCase field names (sessionToken, accessToken, …). This v1 route is unchanged.
curl --request POST \
--url https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start \
--header 'Content-Type: application/json' \
--header 'x-program-id: <x-program-id>' \
--data '
{
"session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b",
"friendly_name": "My phone"
}
'import requests
url = "https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start"
payload = {
"session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b",
"friendly_name": "My phone"
}
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({
session_token: '3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b',
friendly_name: 'My phone'
})
};
fetch('https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start', 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/security-setup/passkey/register/start",
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([
'session_token' => '3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b',
'friendly_name' => 'My phone'
]),
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/security-setup/passkey/register/start"
payload := strings.NewReader("{\n \"session_token\": \"3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b\",\n \"friendly_name\": \"My phone\"\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/security-setup/passkey/register/start")
.header("x-program-id", "<x-program-id>")
.header("Content-Type", "application/json")
.body("{\n \"session_token\": \"3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b\",\n \"friendly_name\": \"My phone\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.next.orenda.finance/v1/auth/security-setup/passkey/register/start")
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 \"session_token\": \"3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b\",\n \"friendly_name\": \"My phone\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"session_token": "3f1c2e8a-9b4d-4e6f-8a1b-2c3d4e5f6a7b",
"publicKey": {
"rp": {
"id": "next.orenda.finance",
"name": "Orenda"
},
"user": {
"id": "dXNlci1jdXN0XzNmOWEyYjdl",
"name": "ada.lovelace@example.com",
"displayName": "Ada Lovelace"
},
"challenge": "q1n9bXJ0c2VjdXJlY2hhbGxlbmdl",
"pubKeyCredParams": [
{
"type": "public-key",
"alg": -7
},
{
"type": "public-key",
"alg": -257
}
],
"timeout": 120000,
"authenticatorSelection": {
"residentKey": "preferred",
"userVerification": "required"
},
"attestation": "none"
}
}
}Headers
Identifies the program. Can also be sent as the programId query parameter.
The origin your app runs on, e.g. https://app.example.com or http://localhost:3000. A passkey only works on the site or app that created it, so we read this to find which of your program's domains that is and build the challenge for it. It must match a configured origin exactly (scheme, host and port), or the call fails with 422 Origin not allowed. Browsers send it for you; native apps, scripts and Postman must set it themselves. To add an origin, ask your Orenda contact.