Consent-based Digital Identity (CDI)
Consent-based Digital Identity (CDI)
Consent-based Digital Identity (CDI) lets users who already have a validated identity in the VLens Network register with your tenant without repeating national ID capture or email OTP. The user explicitly consents via OTP before their identity is linked. CSO and NTRA re-checks run automatically against the identity already on file.
This is a separate product flow from Digital Identity KYC (ID scan + liveness after registration) and from E-Contracting. Pick one registration path per user.
All CDI endpoints require only the ApiKey header — no bearer token. See Authentication for the full list of API-key-only endpoints.
If CheckExistenceOfEmailOrPhone returns hasCDI: false, use the standard registration flow instead. Do not call StepVerifyCDI or pass useCdi: true for those users.
VLens Network architecture
CDI works because the user’s digital identity already exists in the VLens Network. When a user verified with another tenant joins your app, Vlens matches their selfies against the ID already on file instead of asking them to scan their national ID again.
How CDI works
Phone OTP (consent) and liveness — no email OTP or ID capture.
Skip repeated document capture for users already verified in the VLens Network.
CSO and NTRA re-checks run automatically against the ID already on file.
Fewer steps means more users complete registration.
Step overview
From the user’s perspective, CDI is only two steps: phone OTP (consent) and liveness. Your app handles CheckExistenceOfEmailOrPhone, OTP validation, and StepCreate in the background.
Step 1 — Check existence
Call CheckExistenceOfEmailOrPhone before registration. When the response includes hasCDI: true, the user has a network identity eligible for CDI and can onboard via the CDI flow.
cURL
JavaScript
Python
Response (CDI-eligible user):
Step 2 — Send CDI phone OTP
For CDI onboarding, send the phone OTP with useCdi: true. VLens notifies the user they are consenting to link their network identity to your organization. The OTP confirms phone possession and CDI approval.
cURL
JavaScript
Python
Step 3 — Validate CDI phone OTP
Validate the OTP using the same endpoint:
cURL
JavaScript
Python
Step 4 — CDI liveness and face match
Submit three selfie frames. Vlens checks liveness, matches the selfies against the validated ID already on file, and performs CSO and NTRA re-checks in the background.
Capture rules: All three images must be of the same person and captured within 0.5 seconds of each other. Identical frames or frames taken too far apart will fail liveness.
Image compression
Encode each selfie as base64 JPEG or PNG before sending in scanTransaction. Compress for speed and reliability:
See Errors for limit-related error codes (5002, 5003, 5006).
cURL
JavaScript
Python
Step 5 — Create the user
If CDI verification succeeds, complete registration with SkipEmail: true:

