Skip to content

initializeSDK

initializeSDK(): Promise<void>

Initializes the Identity Verification SDK using credentials from TransmitSecurity.plist (iOS) or strings.xml (Android).

Example

import IdentityVerification from 'react-native-ts-idv';

await IdentityVerification.initializeSDK();

startIdentityVerification

startIdentityVerification(startToken): Promise<void>

Starts the identity verification process. This triggers the native SDK to present the document capture and verification flow. Status updates are delivered via the idv_status_change_event event emitter.

Parameters

NameTypeDescription
startTokenstringA session start token obtained from the backend by creating a verification session

Example

import IdentityVerification from 'react-native-ts-idv';

const startToken = verificationSession.startToken;
await IdentityVerification.startIdentityVerification(startToken);

setLogLevel

setLogLevel(logLevel): Promise<void>

Configures the SDK log level for debugging. On Android, setting the log level to off disables all logging; any other valid level enables logging.

Parameters

NameTypeDescription
logLevelTSIDV.IDVLogLevelThe desired log level

Verification status events

Register for verification status updates using the idv_status_change_event event name with a NativeEventEmitter:

import { NativeModules, NativeEventEmitter } from 'react-native';

const { TsIdv } = NativeModules;
const eventEmitter = new NativeEventEmitter(TsIdv);

const subscription = eventEmitter.addListener(
    'idv_status_change_event',
    (params) => {
        const status = params['status'];
        const additionalData = params['additionalData'];
        // Handle status change
    }
);

For all possible status values, see VerificationStatus.