Skip to content

Getting Started

Terminal window
npm install @capgo/capacitor-verisoul
npx cap sync

Call configure() once, early in your app startup. Use sandbox for testing and prod for production traffic.

import { Verisoul } from '@capgo/capacitor-verisoul';
await Verisoul.configure({
environment: 'prod',
projectId: 'YOUR_PROJECT_ID',
});

After Verisoul has collected enough native signals, request the session ID and send it to your backend. Your backend should call Verisoul’s server-side API for the risk assessment.

const { sessionId } = await Verisoul.getSessionId();
await fetch('/api/risk/verisoul', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ sessionId }),
});

Call reinitialize() when user context changes, such as logout followed by login as another account.

await Verisoul.reinitialize();

On Android, forward touch events when your app needs Verisoul touch-pattern collection.

await Verisoul.recordTouchEvent({
x: 120,
y: 240,
action: 'down',
});
  • iOS setup covers App Attest entitlement notes.
  • Android setup covers the Verisoul Maven repository and permissions.

If you are using Getting Started to integrate Verisoul sessions, connect it with @capgo/capacitor-verisoul for the API overview, iOS setup for App Attest notes, Android setup for Gradle setup, and Using @capgo/capacitor-verisoul for the plugin tutorial.