Skip to main content

Method Signature

FAD_SDK.startIdentyFingerprints(
  detectionModes: string[],
  credentials: IdentyCredentials,
  configuration?: Configuration
): Promise<IdentyFingerprintsResponse>

Description

The startIdentyFingerprints() method initiates the Identy fingerprint capture module for capturing fingerprint biometric data. This method can capture multiple fingerprints in various configurations (left hand, right hand, specific fingers, etc.).

Parameters

detectionModes
string[]
required
Array of fingerprint detection modes specifying which fingers to captureCommon detection modes:
  • 'L4F' - Left hand 4 fingers (index, middle, ring, pinky)
  • 'R4F' - Right hand 4 fingers (index, middle, ring, pinky)
  • 'LT' - Left thumb
  • 'RT' - Right thumb
Example: ['L4F', 'R4F'] to capture all 8 fingers (excluding thumbs)
credentials
IdentyCredentials
required
Identy service credentials
configuration
Configuration
Optional configuration object for customizing the module’s behavior and appearance

Returns

IdentyFingerprintsResponse
Promise<object>
A promise that resolves with the Identy fingerprints module response

Code Example

import FadSDK from '@fad-producto/fad-sdk';

const CREDENTIALS = {
  app: 'YOUR_IDENTY_APP_ID',
};

const TOKEN = 'YOUR_FAD_TOKEN';

const CONFIGURATION = {
  views: {
    instructions: true,
  },
  customization: {
    fadCustomization: {
      colors: {
        primary: '#0066CC',
      },
      buttons: {
        primary: {
          backgroundColor: '#0066CC',
          labelColor: '#ffffff',
        },
      },
    },
    moduleCustomization: {
      legends: {
        locale: 'en',
      },
      legendsInstructions: {
        title: 'Fingerprint Capture',
        subtitle: 'Place your fingers on the scanner',
        buttonNext: 'Continue',
      },
    },
  },
};

async function captureFingerprintsWithIdenty() {
  const options = {
    environment: FadSDK.getFadEnvironments().UATHA
  };

  // Capture left and right hand 4 fingers
  const detectionModes = ['L4F', 'R4F'];

  const FAD_SDK = new FadSDK(TOKEN, options);
  
  try {
    const moduleResponse = await FAD_SDK.startIdentyFingerprints(
      detectionModes,
      CREDENTIALS,
      CONFIGURATION
    );

    // Process the results
    console.log('Fingerprints captured successfully');
    console.log('Fingerprint data:', JSON.stringify(moduleResponse.data, null, 2));

    // The response contains fingerprint templates and quality scores
    // for each captured finger

  } catch (error) {
    if (error.code === FadSDK.Errors.Identy.NO_CREDENTIALS) {
      console.error('Missing credentials');
    } else if (error.code === FadSDK.Errors.Identy.TIME_OUT) {
      console.error('Capture timeout exceeded');
    } else {
      console.error('Error:', error);
    }
  } finally {
    FAD_SDK.end();
  }
}

Detection Modes

The following detection modes are commonly supported:
ModeDescription
L4FLeft hand 4 fingers (index, middle, ring, pinky)
R4FRight hand 4 fingers (index, middle, ring, pinky)
LTLeft thumb
RTRight thumb
You can combine multiple modes in the array to capture different sets of fingerprints in sequence.

Error Handling

The method may throw errors that can be identified using FadSDK.Errors.Identy:
  • NO_CREDENTIALS - Missing credentials
  • TIME_OUT - Capture timeout exceeded
Fingerprint capture requires specialized hardware (fingerprint scanner) connected to the device. Ensure the scanner is properly connected and configured before using this module.
Always call FAD_SDK.end() in a finally block to properly clean up resources after the module completes or fails.

Build docs developers (and LLMs) love