Skip to main content

Silent Revalidation

Uses the Silent Revalidation engine, which analyzes the user's behavioral context within Unico's network effect and delivers the confidence signal for the current transaction. In other words, we deliver the confidence level of being the expected user in the transaction.

Requirement

Minimum version: 4.62.0

UnicoCheckPrepareInfo attributes
AttributeTypeRequiredDescription
externalUserIdString✅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 in the native code

initializeSDK is not exposed in Dart. It has to run before the Flutter engine starts, so you call it in your app's native code — Application.onCreate on Android and application(_:didFinishLaunchingWithOptions:) on iOS.

Call it on app launch

UnicoSDK.initializeSDK must be called as early as possible on app launch. Calling it later reduces background processing time and increases the chance of inconclusive authentication responses.

import android.app.Application
import com.acesso.acessobio_android.onboarding.UnicoSDK
import com.acesso.acessobio_android.onboarding.models.Environment
import com.acesso.acessobio_android.onboarding.models.UnicoSDKConfig

class MainApplication : Application() {
override fun onCreate() {
super.onCreate()

UnicoSDK.initializeSDK(
this,
UnicoSDKConfig(
sdkKey = "your_sdk_key",
bundleId = "your_bundle_id",
environment = Environment.UAT
)
)
}
}

Register the class in android/app/src/main/AndroidManifest.xml:

<application android:name=".MainApplication">

The plugin exposes the native capture SDK to your application, so UnicoSDK is already on your compile classpath — no extra dependency is needed in android/app/build.gradle.

If environment is omitted, the default is production.

Step 2 — Implement startSilentValidation

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

import 'package:unico_check/unico_check.dart';

try {
await UnicoSilentAuthDefault().startSilentValidation(
UnicoCheckPrepareInfo(externalUserId: 'external_user_id'),
);
} on UnicoError catch (error) {
// error.code, error.description, error.info
}

The returned Future completes when the validation starts successfully, and throws UnicoError on failure.

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

Errors
CodeMeaning
75001SDK not initialized. initializeSDK was not called, hasn't finished yet, or failed.
75000Generic capture failure.

UnicoError.info carries the step of the flow that failed. It is provided on iOS and is always null on Android.

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.

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

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": "[email protected]",
"phone": "5519725570707"
},
"useCase": "Onboarding",
"externalUserId": "external_user_id"
}'

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

{
"id": "80371b2a-3ac7-432e-866d-57fe37896ac6",
"status": 3,
"silentAuth": {
"result": "yes"
}
}
FieldTypeDescription
silentAuth.resultstringyes or no — see possible values below.
silentAuth.result — possible values
ValueMeaning
yesAuthentication approved, user recognized with sufficient confidence, no additional capture needed.
noInsufficient data to approve silently. Authenticating via biometrics (selfie) or another alternative method is recommended.