Verify your first PID in 5 minutes
Run a complete EUDI wallet verification in test mode: a free test key, one API call, a test wallet that answers it, and a verified result. No account, no review and no real identity data.
You need a terminal with curl and jq (or Node.js 18 or later, or Python 3 with requests) and a browser. The example checks that the holder is over 18 with the age-verification check type, which asks the wallet for the PID birth date and returns only a boolean.
1. Get test keys
Open the test keys page, enter a project name and choose Create test keys. You get a Nexiel Verify key and a Nexiel Screen key, each a client_id starting nx-test- and a client_secret, shown once. Keep the Verify key:
export NEXIEL_CLIENT_ID="nx-test-..." # the Verify key's client_id
export NEXIEL_CLIENT_SECRET="..." # its client_secret2. Exchange the key for an access token
Nexiel API keys are OAuth 2.0 clients. Exchange the key for an access token, valid for 5 minutes, and send it as a bearer token. Run this again whenever a call returns 401. Authentication has the details.
export NEXIEL_ACCESS_TOKEN=$(curl -s https://auth.nexiel.io/realms/nexiel/protocol/openid-connect/token \
-d grant_type=client_credentials \
-d client_id="$NEXIEL_CLIENT_ID" \
-d client_secret="$NEXIEL_CLIENT_SECRET" | jq -r .access_token)const response = await fetch('https://auth.nexiel.io/realms/nexiel/protocol/openid-connect/token', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({
grant_type: 'client_credentials',
client_id: process.env.NEXIEL_CLIENT_ID,
client_secret: process.env.NEXIEL_CLIENT_SECRET,
}),
});
if (!response.ok) throw new Error(`token request failed: ${response.status}`);
const { access_token: accessToken, expires_in: expiresIn } = await response.json();import os
import requests
response = requests.post(
"https://auth.nexiel.io/realms/nexiel/protocol/openid-connect/token",
data={
"grant_type": "client_credentials",
"client_id": os.environ["NEXIEL_CLIENT_ID"],
"client_secret": os.environ["NEXIEL_CLIENT_SECRET"],
},
timeout=10,
)
response.raise_for_status()
access_token = response.json()["access_token"]3. Create a verification session
A session is one request to a wallet. Send an Idempotency-Key so a retry can never create a second session. clientId is a label of your choice: Nexiel identifies you from the key.
curl -s -X POST https://compliance.nexiel.io/v1/verify/sessions \
-H "Authorization: Bearer $NEXIEL_ACCESS_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"clientId":"quickstart","checkType":"age-verification"}'import { randomUUID } from 'node:crypto';
const response = await fetch('https://compliance.nexiel.io/v1/verify/sessions', {
method: 'POST',
headers: {
Authorization: `Bearer ${accessToken}`,
'Idempotency-Key': randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({"clientId":"quickstart","checkType":"age-verification"}),
});
const session = await response.json();import uuid
response = requests.post(
"https://compliance.nexiel.io/v1/verify/sessions",
headers={
"Authorization": f"Bearer {access_token}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={"clientId": "quickstart","checkType": "age-verification"},
timeout=10,
)
response.raise_for_status()
session = response.json(){
"sessionId": "f1be0a07-e161-4827-a4c3-3337952859ff",
"livemode": false,
"clientId": "x509_hash:Uvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk",
"flow": "cross_device",
"requestUri": "https://compliance.nexiel.io/v1/verify/sessions/f1be0a07-e161-4827-a4c3-3337952859ff/request-object",
"authorizationRequestUri": "openid4vp://?client_id=x509_hash%3AUvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk&request_uri=https%3A%2F%2Fcompliance.nexiel.io%2Fv1%2Fverify%2Fsessions%2Ff1be0a07-e161-4827-a4c3-3337952859ff%2Frequest-object&request_uri_method=post",
"sessionToken": "Yq3nW0vR8tLx...(truncated, 43 chars)",
"dcApi": null,
"expiresAt": "2026-11-13T10:10:00.000Z",
"hostedUrl": "https://compliance.nexiel.io/v1/verify/hosted/f1be0a07-e161-4827-a4c3-3337952859ff#token=Yq3nW0vR8tLx...",
"sandboxWalletUrl": "https://sandbox.nexiel.io/present?client_id=x509_hash%3AUvo3HtuIxuhC92rShpgqcT3YXwrqRxWEviRiA0OZszk&request_uri=https%3A%2F%2Fcompliance.nexiel.io%2Fv1%2Fverify%2Fsessions%2Ff1be0a07-e161-4827-a4c3-3337952859ff%2Frequest-object&request_uri_method=post"
}livemode is false: the session runs in test mode and trusts only test credentials. Keep the sessionId and the sandboxWalletUrl. A real wallet opens authorizationRequestUri from a QR code or a tap, and hostedUrl is a Nexiel page that shows that QR code for you. The session expires after 10 minutes.
export SESSION_ID="f1be0a07-..."
export SANDBOX_WALLET_URL="https://sandbox.nexiel.io/present?client_id=...&request_uri=...&request_uri_method=post"4. Answer from the sandbox wallet
The hosted sandbox wallet at sandbox.nexiel.io plays the part of the user's EUDI wallet. It already holds a test PID for a synthetic adult.
- Open the session's
sandboxWalletUrlin a browser. - The wallet checks the signed request against the Nexiel TEST CA and shows who is asking (your test project) and for what (the birth date). Choose Share.
To run this step from a script instead, call the test helper. It answers the session the same way, with no browser:
curl -s -X POST https://compliance.nexiel.io/v1/verify/sessions/$SESSION_ID/test_helpers/complete -H "Authorization: Bearer $NEXIEL_ACCESS_TOKEN" -H "Idempotency-Key: $(uuidgen)" -H "Content-Type: application/json" -d '{"persona": "adult"}'5. Read the result
curl -s https://compliance.nexiel.io/v1/verify/sessions/$SESSION_ID \
-H "Authorization: Bearer $NEXIEL_ACCESS_TOKEN"const response = await fetch(`https://compliance.nexiel.io/v1/verify/sessions/${session.sessionId}`, {
headers: { Authorization: `Bearer ${accessToken}` },
});
const result = await response.json();
console.log(result.status, result.decision?.booleanProofs);response = requests.get(
f"https://compliance.nexiel.io/v1/verify/sessions/{session['sessionId']}",
headers={"Authorization": f"Bearer {access_token}"},
timeout=10,
)
result = response.json()
print(result["status"], result["decision"] and result["decision"]["booleanProofs"]){
"sessionId": "f1be0a07-e161-4827-a4c3-3337952859ff",
"clientId": "docs-example-client",
"checkType": "age-verification",
"templateVersion": "age-verification@3",
"livemode": false,
"status": "completed",
"createdAt": "2026-11-13T10:00:00.000Z",
"expiresAt": "2026-11-13T10:10:00.000Z",
"metadata": {},
"sandboxWalletUrl": null,
"decision": {
"method": "eudi_wallet",
"booleanProofs": {
"ageOver18": true
},
"amlResult": null,
"pepFlag": null,
"sanctionedFlag": null,
"listsChecked": [],
"humanReviewRequired": false,
"frozenDecisionArtifact": null,
"screeningCandidates": null,
"credentialMechanism": "pid_sd_jwt_vc",
"evidencePackStatus": "not_applicable",
"evidencePackDelivery": null,
"issuerCertificateStatus": {
"status": "good",
"handling": "accepted"
},
"credentialStatus": {
"status": "valid",
"mechanism": "status_list",
"handling": "accepted",
"unavailableReason": null
},
"transactionDataBinding": null,
"scaAuthentication": null,
"trustPolicy": {
"versionId": null,
"sha256": "9b1f0d6c2a4e8f3b7c5d1e9a0f2b4c6d8e1f3a5b7c9d0e2f4a6b8c0d1e3f5a7b",
"trustSource": "eu_pid_providers",
"issuerJurisdiction": null,
"trustAnchorSha256": null,
"issuerRegistration": null
},
"decidedAt": "2026-11-13T10:01:12.000Z"
}
}status is completed and decision.booleanProofs.ageOver18 is true. The birth date the wallet disclosed was used to compute that boolean and then discarded: it is never stored or returned. Before the wallet answers, status is pending and decision is null.
Try it with a minor
Create a new session and complete it with {"persona": "minor"}, or add Test PID (SD-JWT VC, minor) in the sandbox wallet and share it. The session completes with ageOver18: false. Testing lists every test credential and persona, and the result each produces.
Next steps
- Get notified instead of polling: add a webhook endpoint for
verify.session.completedand verify its signature. - Choose the right flow for your page, a QR code, a same-device redirect or the browser Digital Credentials API, in Verification sessions.
- Pick the check your use case needs, from all Verify check types.
- See what changes with a live key in Test mode and live mode, and plan your launch with Going live.
- Keep your integration on the version you tested by sending
Nexiel-Version: 2026-11-19with every request. See API versioning.