Skip to main content
The C# SDK gives .NET apps Emirates ID reading and fingerprint capture, distributed as the 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.
The downloadable example references the SDK from local files — a <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:
The package ships native libraries for all four runtime IDs; the example’s .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:
The package runs on Windows, Linux, and macOS out of the box. Card-read and fingerprint flows require the matching hardware support installed on the machine — see Supported devices.

Initialize

The API secret never enters the SDK. You pass an 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.
The request type you pass to ValidateAsync determines which document is validated and what hardware it needs.
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 the Fingerprint 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 return Task<T> and accept an optional CancellationToken. Shared types are in Data types. Validation request types:
Export logs:
Errors throw MBKYCException with a typed ErrorCode.