Link a wallet to this account
curl --request POST \
--url https://calibri.io/api/v2/persona/resource/users/wallet \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"message": "Sign in to Calibri: 8f21c4a9e0b7",
"signature": "0x7b21…"
}
'import requests
url = "https://calibri.io/api/v2/persona/resource/users/wallet"
payload = {
"message": "Sign in to Calibri: 8f21c4a9e0b7",
"signature": "0x7b21…"
}
headers = {
"X-Auth-Apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Apikey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'Sign in to Calibri: 8f21c4a9e0b7', signature: '0x7b21…'})
};
fetch('https://calibri.io/api/v2/persona/resource/users/wallet', 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://calibri.io/api/v2/persona/resource/users/wallet",
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([
'message' => 'Sign in to Calibri: 8f21c4a9e0b7',
'signature' => '0x7b21…'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Apikey: <api-key>"
],
]);
$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://calibri.io/api/v2/persona/resource/users/wallet"
payload := strings.NewReader("{\n \"message\": \"Sign in to Calibri: 8f21c4a9e0b7\",\n \"signature\": \"0x7b21…\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Apikey", "<api-key>")
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://calibri.io/api/v2/persona/resource/users/wallet")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Sign in to Calibri: 8f21c4a9e0b7\",\n \"signature\": \"0x7b21…\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/persona/resource/users/wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"Sign in to Calibri: 8f21c4a9e0b7\",\n \"signature\": \"0x7b21…\"\n}"
response = http.request(request)
puts response.read_body{
"wallet_address": "0xE1188438C85C98aADFf1a88f97764E607B4978C3"
}Account
Link a wallet to this account
Attaches a verified EOA to the SIGNED-IN account, so an email or social member can trade non-custodially. Distinct from wallet login, which finds or creates an account for the wallet. Returns 409 if either the account or the wallet is already linked.
POST
/
api
/
v2
/
persona
/
resource
/
users
/
wallet
Link a wallet to this account
curl --request POST \
--url https://calibri.io/api/v2/persona/resource/users/wallet \
--header 'Content-Type: application/json' \
--header 'X-Auth-Apikey: <api-key>' \
--data '
{
"message": "Sign in to Calibri: 8f21c4a9e0b7",
"signature": "0x7b21…"
}
'import requests
url = "https://calibri.io/api/v2/persona/resource/users/wallet"
payload = {
"message": "Sign in to Calibri: 8f21c4a9e0b7",
"signature": "0x7b21…"
}
headers = {
"X-Auth-Apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Auth-Apikey': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({message: 'Sign in to Calibri: 8f21c4a9e0b7', signature: '0x7b21…'})
};
fetch('https://calibri.io/api/v2/persona/resource/users/wallet', 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://calibri.io/api/v2/persona/resource/users/wallet",
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([
'message' => 'Sign in to Calibri: 8f21c4a9e0b7',
'signature' => '0x7b21…'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Apikey: <api-key>"
],
]);
$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://calibri.io/api/v2/persona/resource/users/wallet"
payload := strings.NewReader("{\n \"message\": \"Sign in to Calibri: 8f21c4a9e0b7\",\n \"signature\": \"0x7b21…\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Auth-Apikey", "<api-key>")
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://calibri.io/api/v2/persona/resource/users/wallet")
.header("X-Auth-Apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"Sign in to Calibri: 8f21c4a9e0b7\",\n \"signature\": \"0x7b21…\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://calibri.io/api/v2/persona/resource/users/wallet")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Auth-Apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"Sign in to Calibri: 8f21c4a9e0b7\",\n \"signature\": \"0x7b21…\"\n}"
response = http.request(request)
puts response.read_body{
"wallet_address": "0xE1188438C85C98aADFf1a88f97764E607B4978C3"
}Authorizations
HMAC-signed API key. Send X-Auth-Apikey, X-Auth-Nonce and X-Auth-Signature.
Body
application/json
Response
200 - application/json
The EOA now attached to the account. It is also written into the session, so the next request carries it as a JWT claim.
Example:
"0xE1188438C85C98aADFf1a88f97764E607B4978C3"