Skip to main content
The C SDK lets native applications read Emirates ID and capture fingerprints through a plain C API. Every validate operation is asynchronous and callback-based.

Download the example

A self-contained CLI (with a vendored cJSON). Populate deps/ (see below), fill in the config block, and make.
The example builds against the header + shared library in deps/include/ and deps/lib/. The C SDK is published as individual per-platform files in the Nexus raw repository under mbkyc/mbkyc-capi/<version>/<platform>/ — download the two for your platform (no archive to extract). macOS arm64 example:
Folders by platform: macos-arm64 / macos-x64 (libmbkyc_capi.dylib), linux (libmbkyc_capi.so), windows (mbkyc_capi.dll + .lib). On Linux you can instead install the .deb/.rpm below and copy from /usr/include/mbkyc/ and /usr/lib/.

Install

.deb (apt) or .rpm (yum) — installs headers to /usr/include/mbkyc/ and libs to /usr/lib/. See Configure Nexus.
You get include/mbkyc_capi.h (+ mbkyc_errors.h) and lib/libmbkyc_capi.{so,dylib,dll}.

Create a handle

The config carries the base URL, the non-secret api_key_id, and a token-signing callback. The SDK invokes sign_cb with the JWT signing input (header.payload bytes); you HMAC-SHA256 it via the holder of the API secret and hand the raw signature back through response_cb.
sign_cb and sign_user_data must remain valid until mbkyc_destroy. On failure, set result.kind = MBKYC_SIGN_RESULT_KIND_SIGN_ERROR before calling response_cb.

Validate — tagged union

mbkyc_validate takes one MBKYC_ValidationRequest. The request_type discriminator selects which payload field is valid:
To read a card or capture a fingerprint, install the matching desktop service first (PC/SC for card readers, your fingerprint vendor’s service for biometrics). Without them, reader enumeration returns empty. Manual entry needs no services.
The requests available per document type:
  • Manual entryMBKYC_VALIDATION_REQUEST_TYPE_EMIRATES_ID_MANUAL. No hardware.
  • Card readMBKYC_VALIDATION_REQUEST_TYPE_EMIRATES_ID_CARD. Needs a smart card reader + PC/SC service.
  • + FingerprintMBKYC_VALIDATION_REQUEST_TYPE_EMIRATES_ID_MANUAL_BIOMETRIC and MBKYC_VALIDATION_REQUEST_TYPE_EMIRATES_ID_CARD_BIOMETRIC. Needs a fingerprint sensor + its service (in addition to the card reader for the card variant).
Each request_type selects the matching payload field, per the discriminator reference:

Callback contract

Every async call takes three callbacks + a user_data pointer:
  • Exactly one of success / error / cancelled fires per invocation.
  • The success result is owned by the library until you call mbkyc_verification_result_free.
  • The error must be freed via mbkyc_error_free; strings via mbkyc_string_free.
  • Callbacks run on an internal worker thread — marshal to your event loop if needed.

Cancellation & errors

The full code list is in mbkyc_errors.h; see the error reference.
A reference CLI lives at integrations/c/src/main.c in the SDK repo — readers, register, check-registration, validate (with optional --fp-reader), export-logs. It’s the fastest way to see a working signer and biometric callback.

Function reference

Shared value types are described in Data types; the full list of MBKYC_* types is in mbkyc_capi.h and error codes in mbkyc_errors.h. Export logs: