Submit passkey session
curl --request POST \
--url https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-squads-network: <x-squads-network>' \
--data '
{
"sessionKey": {
"key": "[0; 32]",
"expiration": 123
},
"slotNumber": 123,
"authenticatorResponse": {}
}
'import requests
url = "https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session"
payload = {
"sessionKey": {
"key": "[0; 32]",
"expiration": 123
},
"slotNumber": 123,
"authenticatorResponse": {}
}
headers = {
"x-squads-network": "<x-squads-network>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-squads-network': '<x-squads-network>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sessionKey: {key: '[0; 32]', expiration: 123},
slotNumber: 123,
authenticatorResponse: {}
})
};
fetch('https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session', 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://developer-api.squads.so/api/v1/passkeys/submit-passkey-session",
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([
'sessionKey' => [
'key' => '[0; 32]',
'expiration' => 123
],
'slotNumber' => 123,
'authenticatorResponse' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-squads-network: <x-squads-network>"
],
]);
$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://developer-api.squads.so/api/v1/passkeys/submit-passkey-session"
payload := strings.NewReader("{\n \"sessionKey\": {\n \"key\": \"[0; 32]\",\n \"expiration\": 123\n },\n \"slotNumber\": 123,\n \"authenticatorResponse\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-squads-network", "<x-squads-network>")
req.Header.Add("Authorization", "Bearer <token>")
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://developer-api.squads.so/api/v1/passkeys/submit-passkey-session")
.header("x-squads-network", "<x-squads-network>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionKey\": {\n \"key\": \"[0; 32]\",\n \"expiration\": 123\n },\n \"slotNumber\": 123,\n \"authenticatorResponse\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-squads-network"] = '<x-squads-network>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionKey\": {\n \"key\": \"[0; 32]\",\n \"expiration\": 123\n },\n \"slotNumber\": 123,\n \"authenticatorResponse\": {}\n}"
response = http.request(request)
puts response.read_body{
"externallySignedAccount": "<string>",
"sessionKey": {
"key": "[0; 32]",
"expiration": 123
}
}{
"status": 123,
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"expected": "<string>",
"actual": "<string>"
}
],
"metadata": {
"status": 123,
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_id": "<string>",
"useful_links": [
"<string>"
]
},
"custom": {},
"simulation_logs": [
"<string>"
]
}{
"status": 123,
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"expected": "<string>",
"actual": "<string>"
}
],
"metadata": {
"status": 123,
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_id": "<string>",
"useful_links": [
"<string>"
]
},
"custom": {},
"simulation_logs": [
"<string>"
]
}{
"status": 123,
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"expected": "<string>",
"actual": "<string>"
}
],
"metadata": {
"status": 123,
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_id": "<string>",
"useful_links": [
"<string>"
]
},
"custom": {},
"simulation_logs": [
"<string>"
]
}Advanced - Custom UI
Submit Passkey Session
Process WebAuthn authenticator responses and create/update externally signed accounts on the blockchain
POST
/
api
/
v1
/
passkeys
/
submit-passkey-session
Submit passkey session
curl --request POST \
--url https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-squads-network: <x-squads-network>' \
--data '
{
"sessionKey": {
"key": "[0; 32]",
"expiration": 123
},
"slotNumber": 123,
"authenticatorResponse": {}
}
'import requests
url = "https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session"
payload = {
"sessionKey": {
"key": "[0; 32]",
"expiration": 123
},
"slotNumber": 123,
"authenticatorResponse": {}
}
headers = {
"x-squads-network": "<x-squads-network>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-squads-network': '<x-squads-network>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sessionKey: {key: '[0; 32]', expiration: 123},
slotNumber: 123,
authenticatorResponse: {}
})
};
fetch('https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session', 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://developer-api.squads.so/api/v1/passkeys/submit-passkey-session",
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([
'sessionKey' => [
'key' => '[0; 32]',
'expiration' => 123
],
'slotNumber' => 123,
'authenticatorResponse' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-squads-network: <x-squads-network>"
],
]);
$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://developer-api.squads.so/api/v1/passkeys/submit-passkey-session"
payload := strings.NewReader("{\n \"sessionKey\": {\n \"key\": \"[0; 32]\",\n \"expiration\": 123\n },\n \"slotNumber\": 123,\n \"authenticatorResponse\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-squads-network", "<x-squads-network>")
req.Header.Add("Authorization", "Bearer <token>")
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://developer-api.squads.so/api/v1/passkeys/submit-passkey-session")
.header("x-squads-network", "<x-squads-network>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sessionKey\": {\n \"key\": \"[0; 32]\",\n \"expiration\": 123\n },\n \"slotNumber\": 123,\n \"authenticatorResponse\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer-api.squads.so/api/v1/passkeys/submit-passkey-session")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-squads-network"] = '<x-squads-network>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sessionKey\": {\n \"key\": \"[0; 32]\",\n \"expiration\": 123\n },\n \"slotNumber\": 123,\n \"authenticatorResponse\": {}\n}"
response = http.request(request)
puts response.read_body{
"externallySignedAccount": "<string>",
"sessionKey": {
"key": "[0; 32]",
"expiration": 123
}
}{
"status": 123,
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"expected": "<string>",
"actual": "<string>"
}
],
"metadata": {
"status": 123,
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_id": "<string>",
"useful_links": [
"<string>"
]
},
"custom": {},
"simulation_logs": [
"<string>"
]
}{
"status": 123,
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"expected": "<string>",
"actual": "<string>"
}
],
"metadata": {
"status": 123,
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_id": "<string>",
"useful_links": [
"<string>"
]
},
"custom": {},
"simulation_logs": [
"<string>"
]
}{
"status": 123,
"code": "<string>",
"message": "<string>",
"details": [
{
"field": "<string>",
"code": "<string>",
"message": "<string>",
"expected": "<string>",
"actual": "<string>"
}
],
"metadata": {
"status": 123,
"request_id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"resource_id": "<string>",
"useful_links": [
"<string>"
]
},
"custom": {},
"simulation_logs": [
"<string>"
]
}Processes WebAuthn authenticator responses for custom UI implementations. This is an advanced endpoint for companies that need to host passkey flows on their own domain.
For most applications, use the hosted UI approach instead.
Key Notes
- Custom Domain: Use this endpoint when hosting passkey flows on your own domain
- Complete Response Required: Submit the full WebAuthn authenticator response object
- Slot Number: Extract from URL parameters when creating the passkey session
Authorizations
UUID-based API key provided by Squads
Headers
Specifies the network for the API request
Available options:
mainnet, devnet Body
application/json
Type of ceremony being completed
Available options:
create, auth Show child attributes
Show child attributes
Solana slot number for the ceremony
Complete WebAuthn authenticator response as JSON value
Was this page helpful?
⌘I