SDK configuration
The SDK Loader is designed to be easily configured using the parameters passed to the loadSdkfunction. This function automatically creates and configures the <facephi-sdk-provider>.
Configuration parameters
Configuration parametersEvent handling
Event controlComplete configuration example
import { loadSdk } from '@facephi/sdk-loader';
const sdkElement = await loadSdk({
apiKey: 'YOUR_APIKEY',
containerId: 'sdk-container',
customerId: 'user-12345',
});
if (sdkElement) {
// Listen for SDK events
sdkElement.addEventListener('emitIDVIntegration', (event) => {
console.log('Integration event:', event);
});
}Known issues with incorrect APIKEY integration
The following describes the most common issues and how to avoid them.
1
Web configuration error (CORS)
You must 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 occur.
How can you avoid CORS errors?
Make sure you configure your application URL correctly in the "Connect" section when creating an integration in IDV Suite
Deploy the SDK only on the authorized domain.
Last updated