Verifying an External Reader mdoc Response
Submit the decrypted mdoc response after your kiosk completes the reader exchange. The kiosk owns device engagement, the reader key, session encryption, ReaderAuth, and termination.
Prerequisites
- Enable
proximity-verifierinconfig/_features.conf; it is off by default - Keep the exact engagement, reader public COSE key, and handover bytes from the exchange
- Configure the credential policies your deployment requires, including issuer trust when applicable; a signature check alone does not establish issuer trust
The local Docker Compose Verifier2 base URL is http://localhost:7004; standalone deployments normally use port 7003.
Submit the Response
Create and complete a session in one call. There is no session to create before the tap.
Endpoint: POST /verification-session/proximity/device-response
Example Request
curl -X POST \
'http://localhost:7004/verification-session/proximity/device-response' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"flow_type": "iso_18013_5_external_reader",
"core_flow": {
"requestedElements": {
"org.iso.18013.5.1.mDL": { "org.iso.18013.5.1": ["family_name"] }
}
},
"deviceResponse": "{base64DeviceResponse}",
"deviceEngagement": "{base64DeviceEngagement}",
"eReaderKey": "{base64PublicCoseKey}",
"handover": "qr"
}'
Body Parameters
- flow_type: String (required) -
iso_18013_5_external_reader - core_flow: Object (required) - The usual query, policies, webhook, and request retention settings; use
dcql_queryorrequestedElements - deviceResponse: String (required) - Standard base64 of the decrypted DeviceResponse CBOR inside SessionData
- deviceEngagement: String (required) - Standard base64 of the exact engagement CBOR
- eReaderKey: String (required) - Standard base64 of the exact reader public COSE_Key bytes; never send the private key
- handover: String or Object (required) -
"qr"for null handover, or{"type":"nfc","handoverSelect":"{base64Select}"}for static NFC handover. Negotiated NFC also supplieshandoverRequestwith the exact request bytes
Example Response
The public session includes id, terminal status, policy_results, and the presented credentials. Use status together with policy_results for the access decision. A 200 response alone does not mean access should be granted.
Response Codes
200- A public verification session with terminal statusSUCCESSFULorFAILED; inspect status and policy results before granting access400- Invalid request or presentation encoding; no session is created404- The proximity feature is disabled
The response is the same public session representation returned by the info endpoint. Normal session inspection, deletion, and PII-purge operations apply. Retention settings govern how long the result remains available.
One terminal update is emitted: presentation_validation_failed when mdoc validation fails, or credential_policy_results_available after policies decide the outcome. The endpoint does not emit the intermediate wallet-flow events.
Close the Reader Exchange
The kiosk sends termination SessionData itself with status 20 (SESSION_TERMINATION). DeviceResponse status 0 means the wallet returned documents; it is not the reader's termination status.
Preserve signed and transcript bytes exactly. The verifier does not receive the DeviceRequest and cannot attest to which elements your kiosk requested. Each authorized submission creates a new session, including an identical repeated submission; session usage modes do not deduplicate separate creation calls.
Next Steps
- Configure the verification policies
