Skip to main content
Version: Node SDK

Create Session

This methods creates a new session to use with the Salable web components

Code Sample

import { Salable } from '@salable/node-sdk';

const salable = new Salable('{{API_KEY}}', 'v2');

const event = await salable.sessions.create({
scope: SessionScope.PricingTable,
metadata: {
productUuid: '3ab5c243-7052-4906-bdd5-a93500f2dbf0',
},
});

Parameters

createSessionParams (required)

Type: CreateSessionInput

OptionTypeDescriptionRequired
scopestringThe component the created session will be used with
metadataobjectAdditional data needed for the session (varies by scope)

Return Type

For more information about this request see our API documentation on License Object