For the complete documentation index, see llms.txt. This page is also available as Markdown.

SDK configuration

The SDK Loader is designed to be easily configured through the parameters passed to the function loadSdk. This function automatically creates and configures the element <facephi-sdk-provider>.

Configuration parameters

Configuration parameters

Event handling

Event control

Complete configuration example

import { loadSdk } from '@facephi/sdk-loader';

const sdkElement = await loadSdk({
  apiKey: 'YOUR_APIKEY',
  containerId: 'sdk-container',
  customerId: 'user-12345',
});

if (sdkElement) {
  // Escuchar eventos del SDK
  sdkElement.addEventListener('emitIDVIntegration', (event) => {
    console.log('Integration event:', event);
  });
}

Known issues with an incorrect APIKEY Integration

The most common problems and how to avoid them are described below.

1

Web configuration error (CORS)

It is mandatory to provide Facephi with a valid web domain where the SDK will be used. If the SDK is deployed on a different web domain, a CORS (Cross-Origin Resource Sharing) error will appear.

How to avoid CORS errors?

  • Make sure to correctly configure your application's URL in the "Connect" section when creating an Integration in IDV Suite

  • Deploy the SDK only on the authorized domain.

2

Flow configuration error

The apiKey is linked to the products the customer has contracted, which are preconfigured by the Facephi support team. If a specific product is not configured, those components will not be rendered.

Last updated