Configuration Parameters
Required parameters
apiKey
The only required parameter to integrate the SDK is the apiKey. This key is provided by the Facephi support team and is essential for configuring both the web environment where the SDK will be deployed and the different components included in the SDK.
Why is apiKey important?
The apiKey ensures:
Correct authorization and validation of the web platform that uses the SDK.
Proper configuration of the SDK's features and components, allowing smooth operation.
Example: basic usage
import { loadSdk } from '@facephi/sdk-loader';
const sdkElement = await loadSdk({
apiKey: 'YOUR_APIKEY',
containerId: 'sdk-container',
});Optional parameters
containerId
The parameter containerId indicates the ID of the DOM element where the SDK will be rendered. If not provided, the default is 'sdk-container'.
Example: custom container
customerId (highly recommended)
Although not mandatory, the parameter customerId is highly recommended. It serves as an identifier for the operation, allowing customers to associate it with internal identifiers. For example, it can be used to specify a email, document number or any other document or customer identifier.
Important details about customerId:
It is a free-text field.
Each operation should have a unique identifier to ensure proper tracking and traceability.
Example: use of customerId
Why use customerId?
Complete parameter reference
apiKey
string
Yes
-
API Key for SDK authentication
containerId
string
No
'sdk-container'
DOM element ID where the SDK will be rendered
customerId
string
No
-
Customer identifier for tracking
Last updated