Integration Flow
The complete behavioral scoring flow involves both server-side and SDK calls:
Your Backend SDK (on device) TrustVision API
| | |
|--- POST /v1/register_device -------------------------------->|
|<--------------- customer_user_device_id --------------------|
| | |
|--- (pass device credentials to SDK) ----------------------->|
| | |
| |-- POST /v1/behavior/ |
| | create_challenge --------->|
| |<---- challenge_id, nonce, |
| | server_public_key -----|
| | |
| |-- (collect behavioral data) |
| | |
| |-- POST /v1/behavior/ |
| | push_event_batch --------->|
| |<---- status: success --------|
| | |
| |-- (repeat for more batches) |
| | |
|--- POST /v1/behavior/score --------------------------------->|
|<------ behavior_score, risk_level, decision -----------------|
- Your backend calls
POST /v1/register_deviceto register the user's device and receives acustomer_user_device_id. - The SDK uses the device credentials to call
POST /v1/behavior/create_challenge, which returns a challenge ID, nonce, and server public key. - The SDK collects behavioral data (touch, typing, sensors) and pushes batches via
POST /v1/behavior/push_event_batch. - When the session is complete, your backend calls
POST /v1/behavior/scorewith the challenge ID (and optionaltransaction_data) to get the behavior score, risk level, and — when the policy check is enabled — the recommendeddecision.final_action. - On the user's first session, step 4 enrolls the behavioral baseline instead of scoring (
more_details.is_first_session: true); real scoring starts from the second session.