> ## Documentation Index
> Fetch the complete documentation index at: https://eurusys-6c0957fa.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK ↔ Validation Gateway

> What the SDK does on the wire — register the device, open a secure session, and validate — all through your proxy to the Validation Gateway.

The SDK handles all communication with the Validation Gateway for you. You make two calls in your code — `registerDevice()` and `validate()` — and the SDK takes care of the secure session in between. All traffic goes through your [proxy](/overview/architecture) to ICP.

```mermaid theme={null}
sequenceDiagram
    autonumber
    participant SDK as MBKYC SDK
    participant Proxy as Your proxy
    participant VG as Validation Gateway
    SDK->>Proxy: register device
    Proxy->>VG: (MPLS / IP-whitelisted)
    VG-->>SDK: device registered
    SDK->>Proxy: open secure session (handshake)
    Proxy->>VG: 
    VG-->>SDK: session established
    SDK->>Proxy: validate (encrypted)
    Proxy->>VG: 
    VG-->>SDK: verification result
```

## 1. Register the device

The first time the SDK runs on a device, register it. This ties the device to your organization.

```kotlin theme={null}
mbkyc.registerDevice("lobby-kiosk")
```

You can check status at any time with `checkRegistration()` — `active`, `inactive`, or `not_found`. A device must be active before it can validate.

## 2. Secure session

Before each verification the SDK opens a short-lived encrypted session with the Validation Gateway (an authenticated key exchange). **You don't call this yourself** — the SDK does it automatically and re-opens it transparently when it expires, so long-running kiosks keep working.

<Info>
  Sessions are short-lived by design. The channel is encrypted and authenticated end to end; identity data is never sent in the clear.
</Info>

## 3. Validate

Submit an Emirates ID or passport, optionally with a fingerprint. The SDK encrypts the request, sends it through your proxy, and returns the result.

```kotlin theme={null}
val result = mbkyc.validate(
    EmiratesIdManual(
        idNumber = "784-XXXX-XXXXXXX-X",
        documentNumber = "...",
        nationality = "ARE",
    )
)
```

The result is the same shape in every SDK:

```json theme={null}
{
  "success": true,
  "data": { "status": "pass", "verified": true },
  "message": "Verification completed"
}
```

See [Validation methods](/concepts/validation-methods) for the request types and [Biometrics](/concepts/biometrics) for adding a fingerprint.

<Warning>
  You never construct session or encryption logic by hand — the SDK owns it. Authenticate your requests through the [token signer](/concepts/authentication); everything else on the channel is handled for you.
</Warning>
