Skip to main content
Hacktionbase.init(config)
Initializes the SDK, fetches widget configuration from the server, and mounts the chat bubble and iframe on the page.

Parameters

config
ActiobaseConfig
required
Configuration object.

Example

Hacktionbase.init({
  sdkKey: 'sk_live_abc123',
  tenant: 'acme',
  position: 'bottom-left',
  offset: { x: 16, y: 16 },
  hidden: false
});

Behavior

  • Calling init twice without calling destroy() first logs a warning and does nothing.
  • If sdkKey or tenant is missing, the SDK logs an error and does not mount.
  • If the document is still loading, mounting is deferred until DOMContentLoaded.

Pre-queue pattern

You can set configuration on the global Hacktionbase object before the script loads. The SDK will auto-initialize when it detects a queued config:
<script>
  window.Hacktionbase = {
    sdkKey: 'sk_live_abc123',
    tenant: 'acme'
  };
</script>
<script src="https://sdk.hacktionbase.com/hacktionbase.js" async></script>