Creating new client instance

Prev Next
const xg = new XGenClient({

key: '<your_api_key>',

secret: '<your_api_secret>',

clientId: '<your_client_id>',

trackerId: '<your_tracker_id>',

getEnv: () => 'stage', // optional: function that returns the environment (`stage` or `prod`) - defaults to 'prod'

authStore: new LocalCookieAuthStore() // optional - can pass in a custom auth store instance - defaults to LocalCookieAuthStore

});