curl --request POST \
--url https://testnet.edel-api.xyz/v2/auth/register/complete \
--header 'Content-Type: application/json' \
--data '
{
"temporaryAuthenticationToken": "{{temporaryAuthenticationToken}}",
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "{{passkeyCredentialId}}",
"clientData": "{{passkeyClientData}}",
"attestationData": "{{passkeyAttestationData}}"
},
"credentialName": "Example passkey"
},
"socialIdentity": {
"provider": "google",
"idToken": "{{googleIdToken}}"
}
}
'import requests
url = "https://testnet.edel-api.xyz/v2/auth/register/complete"
payload = {
"temporaryAuthenticationToken": "{{temporaryAuthenticationToken}}",
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "{{passkeyCredentialId}}",
"clientData": "{{passkeyClientData}}",
"attestationData": "{{passkeyAttestationData}}"
},
"credentialName": "Example passkey"
},
"socialIdentity": {
"provider": "google",
"idToken": "{{googleIdToken}}"
}
}
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({
temporaryAuthenticationToken: '{{temporaryAuthenticationToken}}',
firstFactorCredential: {
credentialKind: 'Fido2',
credentialInfo: {
credId: '{{passkeyCredentialId}}',
clientData: '{{passkeyClientData}}',
attestationData: '{{passkeyAttestationData}}'
},
credentialName: 'Example passkey'
},
socialIdentity: {provider: 'google', idToken: '{{googleIdToken}}'}
})
};
fetch('https://testnet.edel-api.xyz/v2/auth/register/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
use serde_json::json;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.post("https://testnet.edel-api.xyz/v2/auth/register/complete")
.json(&json!({
"temporaryAuthenticationToken": "{{temporaryAuthenticationToken}}",
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "{{passkeyCredentialId}}",
"clientData": "{{passkeyClientData}}",
"attestationData": "{{passkeyAttestationData}}"
},
"credentialName": "Example passkey"
},
"socialIdentity": {
"provider": "google",
"idToken": "{{googleIdToken}}"
}
}))
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/auth/register/complete"
payload := strings.NewReader("{\n \"temporaryAuthenticationToken\": \"{{temporaryAuthenticationToken}}\",\n \"firstFactorCredential\": {\n \"credentialKind\": \"Fido2\",\n \"credentialInfo\": {\n \"credId\": \"{{passkeyCredentialId}}\",\n \"clientData\": \"{{passkeyClientData}}\",\n \"attestationData\": \"{{passkeyAttestationData}}\"\n },\n \"credentialName\": \"Example passkey\"\n },\n \"socialIdentity\": {\n \"provider\": \"google\",\n \"idToken\": \"{{googleIdToken}}\"\n }\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://testnet.edel-api.xyz/v2/auth/register/complete")
.header("Content-Type", "application/json")
.body("{\n \"temporaryAuthenticationToken\": \"{{temporaryAuthenticationToken}}\",\n \"firstFactorCredential\": {\n \"credentialKind\": \"Fido2\",\n \"credentialInfo\": {\n \"credId\": \"{{passkeyCredentialId}}\",\n \"clientData\": \"{{passkeyClientData}}\",\n \"attestationData\": \"{{passkeyAttestationData}}\"\n },\n \"credentialName\": \"Example passkey\"\n },\n \"socialIdentity\": {\n \"provider\": \"google\",\n \"idToken\": \"{{googleIdToken}}\"\n }\n}")
.asString();{
"version": "external-auth-register-complete/v1",
"walletState": "wallet_ready",
"credential": {
"uuid": "passkey-credential-id",
"kind": "Fido2",
"name": "Primary passkey"
},
"user": {
"id": "dfns-user-id",
"username": "example-trader"
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "request-id",
"code": "unauthorized",
"safeMessage": "A verified end-user session is required.",
"retryable": false,
"recoveryActions": [
"do_not_retry"
],
"occurredAtEpochMs": 0
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "request-id",
"code": "service_degraded",
"safeMessage": "Authentication dependencies are temporarily unavailable.",
"retryable": true,
"recoveryActions": [
"observe_status",
"retry_after"
],
"occurredAtEpochMs": 0
}Complete DFNS end-user registration (v2)
Completes a tracked direct-social DFNS end-user registration using the signed WebAuthn credential and temporary registration token. The caller must re-prove the same Google identity used at initiation. The DFNS result must match the stored user and configured organization; durable state and the DFNS-user to engine-account mapping are mandatory. The first factor is always the passkey. An optional second factor may be a P-256 setup key the browser generated and holds without exporting it; the browser uses it to approve account setup signatures without another passkey prompt, and only when the capabilities response reports registrationSetupKey as available. An optional referral code is resolved only while the DB-backed affiliate-public policy is current and enabled; otherwise a request containing one is hidden with 404 before DFNS creates the credential. A referral binds once, when the referred account is created, and never moves. It is refused when the registrant is the code owner (referral_self) or an account linked to the code owner (account_linked), or when the account already has a fill (referral_after_first_fill). A referral that cannot be checked yet is held for review and earns nothing. The refusal never blocks sign-up, and an existing binding is unchanged. Read the outcome in referredBy on the referral profile.
curl --request POST \
--url https://testnet.edel-api.xyz/v2/auth/register/complete \
--header 'Content-Type: application/json' \
--data '
{
"temporaryAuthenticationToken": "{{temporaryAuthenticationToken}}",
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "{{passkeyCredentialId}}",
"clientData": "{{passkeyClientData}}",
"attestationData": "{{passkeyAttestationData}}"
},
"credentialName": "Example passkey"
},
"socialIdentity": {
"provider": "google",
"idToken": "{{googleIdToken}}"
}
}
'import requests
url = "https://testnet.edel-api.xyz/v2/auth/register/complete"
payload = {
"temporaryAuthenticationToken": "{{temporaryAuthenticationToken}}",
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "{{passkeyCredentialId}}",
"clientData": "{{passkeyClientData}}",
"attestationData": "{{passkeyAttestationData}}"
},
"credentialName": "Example passkey"
},
"socialIdentity": {
"provider": "google",
"idToken": "{{googleIdToken}}"
}
}
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({
temporaryAuthenticationToken: '{{temporaryAuthenticationToken}}',
firstFactorCredential: {
credentialKind: 'Fido2',
credentialInfo: {
credId: '{{passkeyCredentialId}}',
clientData: '{{passkeyClientData}}',
attestationData: '{{passkeyAttestationData}}'
},
credentialName: 'Example passkey'
},
socialIdentity: {provider: 'google', idToken: '{{googleIdToken}}'}
})
};
fetch('https://testnet.edel-api.xyz/v2/auth/register/complete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
use serde_json::json;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.post("https://testnet.edel-api.xyz/v2/auth/register/complete")
.json(&json!({
"temporaryAuthenticationToken": "{{temporaryAuthenticationToken}}",
"firstFactorCredential": {
"credentialKind": "Fido2",
"credentialInfo": {
"credId": "{{passkeyCredentialId}}",
"clientData": "{{passkeyClientData}}",
"attestationData": "{{passkeyAttestationData}}"
},
"credentialName": "Example passkey"
},
"socialIdentity": {
"provider": "google",
"idToken": "{{googleIdToken}}"
}
}))
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/auth/register/complete"
payload := strings.NewReader("{\n \"temporaryAuthenticationToken\": \"{{temporaryAuthenticationToken}}\",\n \"firstFactorCredential\": {\n \"credentialKind\": \"Fido2\",\n \"credentialInfo\": {\n \"credId\": \"{{passkeyCredentialId}}\",\n \"clientData\": \"{{passkeyClientData}}\",\n \"attestationData\": \"{{passkeyAttestationData}}\"\n },\n \"credentialName\": \"Example passkey\"\n },\n \"socialIdentity\": {\n \"provider\": \"google\",\n \"idToken\": \"{{googleIdToken}}\"\n }\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://testnet.edel-api.xyz/v2/auth/register/complete")
.header("Content-Type", "application/json")
.body("{\n \"temporaryAuthenticationToken\": \"{{temporaryAuthenticationToken}}\",\n \"firstFactorCredential\": {\n \"credentialKind\": \"Fido2\",\n \"credentialInfo\": {\n \"credId\": \"{{passkeyCredentialId}}\",\n \"clientData\": \"{{passkeyClientData}}\",\n \"attestationData\": \"{{passkeyAttestationData}}\"\n },\n \"credentialName\": \"Example passkey\"\n },\n \"socialIdentity\": {\n \"provider\": \"google\",\n \"idToken\": \"{{googleIdToken}}\"\n }\n}")
.asString();{
"version": "external-auth-register-complete/v1",
"walletState": "wallet_ready",
"credential": {
"uuid": "passkey-credential-id",
"kind": "Fido2",
"name": "Primary passkey"
},
"user": {
"id": "dfns-user-id",
"username": "example-trader"
}
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "request-id",
"code": "unauthorized",
"safeMessage": "A verified end-user session is required.",
"retryable": false,
"recoveryActions": [
"do_not_retry"
],
"occurredAtEpochMs": 0
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "request-id",
"code": "service_degraded",
"safeMessage": "Authentication dependencies are temporarily unavailable.",
"retryable": true,
"recoveryActions": [
"observe_status",
"retry_after"
],
"occurredAtEpochMs": 0
}