Complete SIWE Login
curl --request POST \
--url https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge \
--header 'Content-Type: application/json' \
--data '
{
"id": "ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=",
"signature": "8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c",
"source": "web"
}
'import requests
url = "https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge"
payload = {
"id": "ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=",
"signature": "8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c",
"source": "web"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=',
signature: '8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c',
source: 'web'
})
};
fetch('https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge', 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.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge",
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([
'id' => 'ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=',
'signature' => '8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c',
'source' => 'web'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge"
payload := strings.NewReader("{\n \"id\": \"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=\",\n \"signature\": \"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c\",\n \"source\": \"web\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=\",\n \"signature\": \"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c\",\n \"source\": \"web\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=\",\n \"signature\": \"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c\",\n \"source\": \"web\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"identifier": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"authType": "web3",
"accountId": "10458932786832481",
"issuedAtSecs": 1709648400,
"expirationSecs": 1709734800,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"newAccount": false
}
}{
"success": false,
"error": "Description of the error",
"error_code": "account_cannot_be_verified"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Auth
Complete SIWE Login
Complete Sign-In with Ethereum by submitting the signed challenge. Returns JWT.
POST
/
v1
/
auth
/
erc-4361
/
login
/
complete_challenge
Complete SIWE Login
curl --request POST \
--url https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge \
--header 'Content-Type: application/json' \
--data '
{
"id": "ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=",
"signature": "8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c",
"source": "web"
}
'import requests
url = "https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge"
payload = {
"id": "ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=",
"signature": "8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c",
"source": "web"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=',
signature: '8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c',
source: 'web'
})
};
fetch('https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge', 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.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge",
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([
'id' => 'ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=',
'signature' => '8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c',
'source' => 'web'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge"
payload := strings.NewReader("{\n \"id\": \"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=\",\n \"signature\": \"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c\",\n \"source\": \"web\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=\",\n \"signature\": \"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c\",\n \"source\": \"web\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/auth/erc-4361/login/complete_challenge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o=\",\n \"signature\": \"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c\",\n \"source\": \"web\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"identifier": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"authType": "web3",
"accountId": "10458932786832481",
"issuedAtSecs": 1709648400,
"expirationSecs": 1709734800,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"newAccount": false
}
}{
"success": false,
"error": "Description of the error",
"error_code": "account_cannot_be_verified"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Body
application/json
The ID of the login challenge
Example:
"ub6EabCuCiw9HvYyhsZhWzv8mntMgZ-vDGzZKvvCi_o="
The signed challenge proving wallet ownership
Example:
"8650fc18ca35d1e3c358b566ff786783978dc16519c055ba2085a2345bed89f46719876e3e01cf3bbf94c50f6b5524c3df3d9881386f11910ddb3a15bfade5f21c"
Optional source identifier
Example:
"web"
Response
Auth token
Whether the request was successful
Example:
true
Error message, present only on failure
Example:
""
Semantic error code. See each endpoint's error responses for the specific codes it can return.
Deprecation notice, if applicable
Example:
""
Show child attributes
Show child attributes
⌘I