Installation
1. Add Dependency
Add the Verisoul SDK to yourpubspec.yaml file:
2. Update the Android minimum minSdk to 24 in android/app/build.gradle
ai.verisoul:android package cannot be downloaded, add the following Maven repository inside your android/build.gradle file:
3. Web support
Add the Verisoul script to yourweb/index.html:
Replace the following parameters:
- : Use either
prodorsandbox - : Your project ID, which must match the environment
Content Security Policy (CSP)
If your application has a Content Security Policy, update it to include the following Verisoul domains:Usage
1. Initialization
2. Get Session ID
Once the minimum amount of data is gathered the session ID becomes available. The session ID is needed in order to request a risk assessment from Verisoul’s API. Note that session IDs are short lived and will expire after 24 hours. The application can obtain session ID by providing the callback as shown below:3. Provide Touch Events
Wrap your App withVerisoulWrapper:
4. Reinitialize
CallingVerisoulSdk.reinitialize() generates a new session_id, which ensures that if a user logs out of one account and into a different account, Verisoul will be able to delineate each account’s data cleanly.
5. SetAccountData (Web-only)
ThesetAccountData() function provides a simplified way to send user account information to Verisoul directly from the client side. While easy to integrate, this method has important limitations:
- Offline analysis only: Data sent via setAccountData() is only visible in the Verisoul dashboard
- No real-time decisions: Unlike the server-side API, this method doesn’t allow your application to receive and act on Verisoul’s risk scores in real-time
- Limited use case: Designed specifically for initial pilots and evaluation purposes
Android
1. Provide Touch Events (Android only)
In order to gather touch events and compare them to device accelerometer sensor data, the app will need to provide touch events to Verisoul. you need to Edit thMainActivity, to override dispatchTouchEvent function and pass the data to Verisoul like shown below.
iOS
Capabilities
To fully utilize VerisoulSDK, you must add theApp Attest capability to your project. This capability allows the SDK to perform necessary checks and validations to ensure the integrity and security of your application.
Update your app’s entitlements file:
Device Check Setup
For iOS apps, you’ll need to set up Device Check and App Attest in the Verisoul dashboard. This requires configuring your Apple Team ID, Bundle Identifier, and Device Check Private Key. See the iOS Device Check and App Attest Integration section for detailed setup instructions.Update the privacy manifest file
Next Steps
- Learn about Backend Integration for API implementation
- See Integration Best Practices
- See Verisoul’s Pub.dev page Flutter SDK
- See the Flutter Sample App for a complete implementation
