Skip to main content

Initialization

To initialize the SDK you need to provide an authentication token.

To get the token you need to create it in the server SDK and pass it to the Widgets SDK.

import { createWidgetsSDK } from '@hautechai/widgets';

const sdk = createWidgetsSDK({ authToken: async () => await getTokenFromServer() });

After you get the token you can create a widget.