Skip to main content
SKOR currently provides a JavaScript SDK. More SDKs will be available soon. Use the SDK when you want an iframe-based integration where SKOR manages the tenant workflow and your application launches the profile session.

Installation

The JavaScript SDK is available by URL. Include it in your HTML page:
<script src="https://api.skortorent.com/sdk/skor.js"></script>

Initialize

After including the SDK, initialize it with your public key.
const sdk = Skor({
  publicKey: "YOUR_PUBLIC_KEY",
});

Start a profile session

To start a profile session, call startProfileSession with a unique user token generated by the API. First, create a tenant using the tenant creation API. Then generate an onboarding token for that tenant. Use that token when starting the SDK profile session.
const profileSessionInstance = sdk.startProfileSession({
  token,
  containerId: "skor-container",
});

Callbacks

You can provide callback functions to handle events during the profile session.

onLoad

Triggered when the profile session loads successfully.
onLoad: () => {
  console.log("Profile Session loaded");
};

onSkorAnalysisRunning

Triggered when profile registration is complete and SKOR analysis is running. During this time, you may want to show a loader because the profile session UI cannot be shown until analysis is complete.
onSkorAnalysisRunning: () => {
  console.log("Skor Analysis is currently running");
};

onCancel

Triggered when the user cancels the profile session or when the cancel method is called.
onCancel: () => {
  console.log("Profile Session Cancelled");
};

onError

Triggered when an error occurs during the profile session.
onError: (error) => {
  console.log("Profile Session error", error);
};

onProfileReady

Triggered when the profile session is ready to be used.
onProfileReady: () => {
  console.log("Profile Session ready");
};
Review SDK authentication before using the SDK in production.