---
title: Silent Revalidation
description: Uses the Smart Revalidation engine, which analyzes the user's behavioral context within Unico's network effect, to deliver a confidence signal for the current transaction — in other words, the confidence level that this is the expected user.
canonical: https://developer.unico.io/dual-api/developers/sdks-and-tools/android/smart-revalidation/silent-revalidation
locale: en
generated_by: markdown-export
---

## PrepareInfo attributes

| Attribute | Type | Required | Description |
|---|---|:-:|---|
| `externalUserId` | `String` | ✅ | User identifier in your system. Automatically hashed with SHA-256 before transmission, never sent in plain text. |

## Starting a Silent Revalidation

****Step 1** — Implement `initializeSDK`**

Create a new `UnicoSDK` class/object, with a static `initializeSDK` method that returns the `UnicoSDK` instance, receiving the `context` and a `UnicoSDKConfig` with your `sdkKey`, `bundleId`, and `environment`. Keep the returned instance — it is needed later to call `startSilentValidation` from Java.

  :::warning[Call it on app launch]
  `UnicoSDK.initializeSDK` must be called as early as possible on app launch (e.g., `Application.onCreate`). Calling it later reduces background processing time and increases the chance of inconclusive authentication responses.
  :::

  ### Kotlin

    ```kotlin
    UnicoSDK.initializeSDK(
        context,
        UnicoSDKConfig(
            sdkKey = "your_sdk_key",
            bundleId = "your_bundle_id",
            environment = Environment.UAT
        )
    )
    ```

### Java

    ```java
    UnicoSDK sdk = UnicoSDK.initializeSDK(
        context,
        new UnicoSDKConfig("your_sdk_key", "your_bundle_id", Environment.UAT)
    );
    ```

****Step 2** — Implement `startSilentValidation`**

After `initializeSDK`, associate the collection already in progress with the identified user by calling `startSilentValidation` with a `PrepareInfo` containing the `externalUserId`.

  ### Kotlin

    ```kotlin
    val prepareInfo = PrepareInfo(
        externalUserId = "external_user_id"
    )

    UnicoSDK.startSilentValidation(prepareInfo)
        .onSuccess { result -> /* ... */ }
        .onFailure { error -> /* ... */ }
    ```

### Java

:::info[Java requires a Kotlin bridge]
    `startSilentValidation` is a Kotlin suspend function — Java can't call it directly. Use the bridge below to make the connection.
    :::

    ```kotlin
    interface SilentAuthCallback {
        fun onSuccess(success: Boolean)
        fun onFailure(message: String?)
    }

    object SilentAuthBridge {

        @JvmStatic
        fun startSilentValidation(
            owner: LifecycleOwner,
            sdk: UnicoSDK,
            externalUserId: String,
            callback: SilentAuthCallback
        ) {
            owner.lifecycleScope.launch {
                val result = sdk.startSilentValidation(PrepareInfo(externalUserId, null))
                result.onSuccess { callback.onSuccess(it.success) }
                    .onFailure { callback.onFailure(it.message) }
            }
        }
    }
    ```

    ```java
    SilentAuthBridge.startSilentValidation(this, sdk, externalUserId, new SilentAuthCallback() {
        @Override
        public void onSuccess(boolean success) {
            /* ... */
        }

        @Override
        public void onFailure(String message) {
            /* ... */
        }
    });
    ```

  If the validation happens at the start of the flow, for example at login, wait for the `onSuccess` callback before moving on to Step 3.

****Step 3** — Create the process and authenticate**

With validation in progress, create the verification process to complete the authentication. See [API Reference ▸ API ▸ Create Process](/dual-api/developers/api-reference/api/post-processes).

  Include the same `externalUserId` sent in the `PrepareInfo` from Step 2 in the request body — this is what allows the backend to correlate the process creation with the validation already in progress.

  ```bash
  curl -X POST https://api.id.unico.app/processes/v1 \
    -H "Authorization: Bearer $TOKEN" \
    -H "APIKEY: $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "subject": {
        "duiType": 1,
        "code": "12345678909",
        "name": "Luke Skywalker",
        "gender": "M",
        "birthDate": "2000-05-20",
        "email": "luke@example.com",
        "phone": "5519725570707"
      },
      "useCase": "Onboarding",
      "externalUserId": "external_user_id",
      "imageBase64": "/9j/4AAQSkZJR..."
    }'
  ```

  The response includes the `silentAuth.result` field with the authentication result:

  ```json
  {
      "id": "80371b2a-3ac7-432e-866d-57fe37896ac6",
      "status": 3,
      "silentAuth": {
          "result": "yes"
      }
  }
  ```

  | Field | Type | Description |
  |---|---|---|
  | `silentAuth.result` | string | `yes` or `no` — see possible values below. |

  <details>
  **`silentAuth.result` — possible values**

  | Value | Meaning |
  |---|---|
  | `yes` | Authentication approved, user recognized with sufficient confidence, no additional capture needed. |
  | `no` | Insufficient data to approve silently. Authenticating via biometrics (selfie) or another alternative method is recommended. |

</details>