MBKYC.Sdk NuGet package. All async operations return Task<T> and honour CancellationToken.
Download the example
A self-contained CLI. Populate
deps/ (see below), fill in the config block, and dotnet run.Populating the example's deps/ folder from the package
Populating the example's deps/ folder from the package
The downloadable example references the SDK from local files — a The package ships native libraries for all four runtime IDs; the example’s
<Reference HintPath="deps/MBKYC.dll"> plus deps/runtimes/ in its .csproj — so it builds without configuring a NuGet source. The MBKYC.Sdk package is self-contained (managed DLL and native runtimes), and a .nupkg is just a ZIP archive, so you extract those two things from it:.csproj copies the one matching your platform next to the build output automatically. For a real project, prefer the <PackageReference> below over vendoring these files.Install
Configure the Nexus NuGet source (Configure Nexus), then:Initialize
ITokenSigner whose SignAsync(byte[] signingInput, CancellationToken) routes the input to the holder of the API secret (your backend), signs it, and returns the signature. See Authentication.
Register & validate
To read a card or capture a fingerprint, install the matching desktop service first —
mbkyc-pcsc-service for card readers and your fingerprint vendor’s service. Without them, the reader lists return empty. Manual entry needs no services.ValidateAsync determines which document is validated and what hardware it needs.
- Emirates ID
- Passport
Manual entry — no hardware required.Card read — needs a smart card reader + the PC/SC desktop service.+ Fingerprint — pass the
Fingerprint argument to either request above (needs a fingerprint sensor + its service).Biometrics
Set theFingerprint property (ReaderId, RecommendationHandler, CaptureTimeoutMs). The recommendation handler is a delegate the SDK invokes mid-flow with the Validation Gateway’s ranked finger candidates. See Biometrics.
Cancellation & errors
CancellationToken cancels an in-flight operation; the task then resolves with a TaskCanceledException. Failures surface as MBKYCException:
ErrorCode is a strongly-typed enum; see the error reference.
MBKYC implements IDisposable — always using it (or Dispose) to release resources and flush logs.Full API reference
All async methods returnTask<T> and accept an optional CancellationToken. Shared types are in Data types.
| Method | Returns |
|---|---|
MBKYC.Create(baseUrl, apiKeyId, tokenSigner, logConfig, httpTimeoutMs = 30000, extraHeaders = null) | MBKYC |
ListSmartcardReadersAsync(ct) | Task<IReadOnlyList<ReaderInfo>> |
ListFingerprintReadersAsync(ct) | Task<IReadOnlyList<ReaderInfo>> |
RegisterDeviceAsync(name, ct) | Task |
CheckRegistrationAsync(ct) | Task<RegistrationStatus> |
ValidateAsync(request, ct) | Task<VerificationResult> |
ExportLogsAsync(path, ct) | Task |
Dispose() | — (IDisposable) |
MBKYCException with a typed ErrorCode.
