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.
Minimum version: 3.3.0
| Attribute | Type | Required | Description |
|---|---|---|---|
externalUserId | String | ✅ | User identifier in your system. Automatically hashed with SHA-256 before transmission, never sent in plain text. |
Step 1 — Implement initializeSDK
Call the static UnicoSDK.initializeSDK method, passing your AcessoBioConfigDataSource and the environment.
UnicoSDK.initializeSDK must be called as early as possible on app launch (e.g., application(_:didFinishLaunchingWithOptions:)). Calling it later reduces background processing time and increases the chance of inconclusive authentication responses.
- Swift
- Objective-C
UnicoSDK.initializeSDK(
config: YourUnicoConfig(),
environment: .UAT
)
[UnicoSDK initializeSDKWithConfig:[YourUnicoConfig new] environment:UAT];
The config is the same AcessoBioConfigDataSource you already implement for capture — the sdkKey comes from getHostKey() and the bundle from getBundleIdentifier():
final class YourUnicoConfig: NSObject, AcessoBioConfigDataSource {
func getBundleIdentifier() -> String { "your_bundle_id" }
func getHostKey() -> String { "your_sdk_key" }
}
If environment is omitted, the default is .PROD.
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.
- Swift
- Objective-C
let prepareInfo = PrepareInfo(externalUserId: "external_user_id")
UnicoSDK.startSilentValidation(prepareInfo: prepareInfo) { result in
switch result {
case .success:
break
case .failure(let error):
print(error.code, error.desc, error.info)
}
}
PrepareInfo *prepareInfo = [[PrepareInfo alloc] initWithExternalUserId:@"external_user_id"
useCase:nil];
[UnicoSDK startSilentValidationWithPrepareInfo:prepareInfo
errorCompletion:^(ErrorBio * _Nullable error) {
if (error == nil) {
// ...
} else {
// error.code, error.desc, error.info
}
}];
If the validation happens at the start of the flow, for example at login, wait for the success callback before moving on to Step 3.
| Code | Meaning |
|---|---|
75001 | SDK not initialized. initializeSDK was not called, hasn't finished yet, or failed. |
75000 | Generic capture failure. |
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 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.
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"
}
}
| Field | Type | Description |
|---|---|---|
silentAuth.result | string | yes or no — see possible values below. |
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. |