SDK reference · React Native SDK / React Native Getting Started

Getting Started

The Incode React Native SDK adds identity verification, onboarding, and authentication flows to your React Native app. This section walks you through installing the SDK, initializing it, and configuring it for your use case.

Start here

If you're new to the SDK, follow these steps in order:

  1. Install the SDK, including platform-specific setup for iOS and Android, and Expo setup if applicable.
  2. Choose an SDK mode based on whether your app captures and validates online, captures only, or submits previously captured data.
  3. Choose an implementation pattern based on where your onboarding flow is configured and how much control your app needs.

The remaining pages in this section cover specific setup options, advanced configurations, and maintenance tasks.

Initialize the SDK

Initialize once before launching any flow.

import IncodeSdk, { IncodeSdkInitError } from '@incode-sdks/react-native-incode-sdk';

try {
  await IncodeSdk.initialize({
    testMode: false,
    apiConfig: {
      key: 'YOUR_API_KEY',
      url: 'YOUR_API_URL',
    },
  });
} catch (error) {
  const e = error as IncodeSdkInitError;
  console.error(`Incode SDK initialize failed: ${e.code} - ${e.message}`);
}

Check initialization when app screens can be re-entered:

const initialized = await IncodeSdk.isInitialized();

Your first flow

Once the SDK is initialized, a minimal onboarding flow looks like this:

import IncodeSdk from '@incode-sdks/react-native-incode-sdk';

await IncodeSdk.initialize({
  testMode: false,
  apiConfig: {
    key: 'YOUR_API_KEY',
    url: 'YOUR_API_URL',
  },
});

const result = await IncodeSdk.startOnboarding({
  flowConfig: [
    { module: 'IdScan' },
    { module: 'SelfieScan' },
    { module: 'FaceMatch' },
  ],
});

console.log(result.status);

Register listeners before starting the flow to react to individual modules as they complete:

const unsubscribe = IncodeSdk.onStepCompleted({
  module: 'SelfieScan',
  listener: (event) => {
    console.log(event.result);
  },
});

Return the unsubscriber from your component cleanup.

For the full integration walkthrough including session configuration, error handling, and the available listener callbacks, see Configure Flows Locally and Run End to End.

Optional and advanced setup

These pages cover specific scenarios:


Was this page helpful?