init
The first step to initialize the Loyalty SDK
The main constructor for initializing the Loyalty Web Kit SDK.
You can learn how to use it with the following recipe
Code example
splioSDK.init({
authType: 'jwt',
authToken: '{{appAuthToken}}',
display: { mode: 'inline', container: '#splio-sdk' },
// The widget mode allows you to display a mobile version loaded from the widget on the bottom right or left corner
// display: { mode: 'widget', container: '#splio-sdk', position: 'bottom right' },
// The hidden mode allows you to use the SDK methods without loading the JavaScript client side.
// display: { mode: 'hidden' },
lang: 'fr',
});
Options properties
Property | Type | Description | Required | Default |
---|---|---|---|---|
authToken | string | Valid access token | Required | |
display | object | Parameters of the display mode | Required | |
authType | string | Could be jwt or sha256 | optional | jwt |
lang | string | Language of the SDK | optional | fr |
Response
void
Updated 6 days ago