Installation
The JavaScript SDK is available by URL. Choose the URL that matches your credentials and environment.- Production
- Sandbox
To test in the sandbox, use
https://dev-api.skortorent.com/sdk/skor.js
together with sandbox credentials and the https://dev-api.skortorent.com/api/v1
API base URL. Do not mix sandbox tokens or credentials with the production SDK.Initialize
After including the SDK, initialize it with yourclient_id.
The SDK is initialized with your public
client_id. Your client_secret is used
only for server-side calls and must never be exposed in browser code. See the
Authentication guide for how to generate a server access token.Start a profile session
Starting a profile session is a two-part flow: your server mints a tenant onboarding token, and your browser launches the session with that token.1. On your server — mint an onboarding token
Using your Bearer access token (see the Authentication guide):- Create the tenant with Create Tenant and keep the returned
id(thetenantId). - Generate an onboarding token for that tenant with Generate Onboarding Token:
- Production
- Sandbox
token. Pass this token to your browser page.
2. In the browser — launch the session
CallstartProfileSession with the onboarding token and the id of the container element that should host the session.
height
The height property controls the height of the embedded iframe.
It accepts either a CSS height value or a number:
- CSS height values such as
"500px", or"800px" - A number, which is treated as pixels, such as
600
height is not provided, it defaults to 500px.