Quick Integrations
This powerful SDK enables the integration of multiple verification journeys using just a single line of code, catering to various user events and scenarios ShuftiPro All-In-One SDK automatically listens for the Journey you associate with a customer and initiates the verification process immediately.
The ShuftiPro Web SDK quick integration can be done in two simple steps:
1.Initialize the SDK
import ShuftiPro from 'shuftipro-web-sdk';
const shuftiPro = new ShuftiPro();
shuftiPro
.init({
client_id: 'YOUR_CLIENT_ID',
customer_id: 'YOUR_CUSTOMER_ID',
containerId: 'div-ID', // optional
// or
iframeId: 'iframe-ID', // optional
})
.start();
To demonstrate the initialization of the All-in-One SDK, download the sample HTML file
In order to associate a new user with a Journey we need to trigger it’s verification, which can be initiated through the following API here.
Parameters
Parameters | Description |
---|---|
client_id | Required: Yes Type: String Your ShuftiPro client ID obtained from the back office. |
customer_id | Required: Yes Type: String The unique identifier of the user within your application. This ID is likely generated by your application upon user registration. |
containerId | Required: No Type: String The ID of the HTML element where the verification interface will be mounted. |
iframeId | Required: No Type: String The ID of the HTML element where the verification interface will be mounted. Alternative of containerId |
To display the verification process within a specific container, initialize the div container and use its ID in the containerId field. You must provide either containerId or iframeId. If the iframeId field is provided, the containerId field will be ignored. If neither is provided, the iframe will open in a popup window.
2.Trigger verification Journey
This API triggers verification for a given customer (customer_id) with the provided verification journey (journey_id).
API Endpoint
https://api.shuftipro.com/create/customer/journey
Authorization Keys
To generate requests using mobile SDKs, you need to obtain the authorizations keys by following given steps here.
Request Parameters
Parameters | Description |
---|---|
journey_id | Required: Yes Type: String The unique identifier of the verification journey you want to associate with the user. This ID is typically obtained from your ShuftiPro back office platform where you define the verification steps for each journey. |
customer_id | Required: Yes Type: String The unique identifier of the user within your application. This ID is likely generated by your application upon user registration. |
reference | Required: No Type: String Each request is assigned a unique reference ID, will be generated if not provided. |
Request payload
{
"journey_id" : "ULMTCqye1719840116",
"customer_id" : "testingCustomer595",
// optional
"reference" : "12345678"
}
Response parameters
Parameters | Description |
---|---|
error | Type: Bool If the association fails, ShuftiPro will return error bool as true, else false. |
message | Type: String If the association is successful, ShuftiPro might return a success response message. |