> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gateway.connexease.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the Embedded Signup SDK via load it from the CDN, with production pinning and Subresource Integrity.

The package ships ESM, CommonJS, and bundled TypeScript types — no extra `@types` needed.

## CDN

**Production — pin to an exact version and add Subresource Integrity (SRI):**

```html theme={null}
<script
  src="https://d38joj22zi0xe8.cloudfront.net/embedded-signup/v1.0.2/sdk.js"
  integrity="sha384-…"
  crossorigin="anonymous"
  defer
></script>
```

| Path                              | Cache              | Use for                                        |
| --------------------------------- | ------------------ | ---------------------------------------------- |
| `…/embedded-signup/v0/sdk.js`     | 5 min, revalidated | Floating — auto-picks the latest `0.x` release |
| `…/embedded-signup/v0.1.0/sdk.js` | 1 year, immutable  | Pinned — recommended for production            |

```ts theme={null}
import { GatewayEmbeddedSignup, GatewayTheme } from '@connexease/gateway-embedded-signup';
```

<Note>
  The `integrity` hash for each release is published in the build's `integrity.json` (or request it from Connexease). When you pin a version, always add the matching `integrity` + `crossorigin="anonymous"` so the browser rejects a tampered file.
</Note>

Render the connect button and launch the WhatsApp Business onboarding flow in a few lines of code.

This is the whole frontend integration: call `init()` once, then call `launch()` from your button's click handler. The only server-side piece you need is the `/api/session` proxy.

```javascript theme={null}
<button id="connect-btn">Connect WhatsApp Business</button>

<script src="https://d38joj22zi0xe8.cloudfront.net/embedded-signup/v1.0.2/sdk.js" defer></script>
<script>
  const widget = window.GatewayEmbeddedSignup.init({
    publishableKey: 'pb_xxxxxxxxxxxxxxxxxxxxxx',
	logoUrl: 'https://www.blabla.com',
    debug: true, // logs the SDK's internal step events to the console (dev only)
  });

  document.getElementById('connect-btn').addEventListener('click', () => {
    widget.launch({
      fetchSessionToken: async () => {
        const res = await fetch('/api/session', { method: 'POST' });
        if (!res.ok) throw new Error('Failed to fetch session');
        return res.json();
      },
		secretKey: 'sk_xxxxxxxxxxxxxxxxxxxxxx',
        isCoexistence: true,
    });
  });
</script>
```

<Note>
  With `debug: true`, the SDK logs each internal **step event** of the flow to the browser console so you can watch it progress while developing. It does **not** log the final result. The connected account details (and any error or cancel) are delivered **only** through the `onSuccess` / `onError` / `onCancel` callbacks — that's how your code actually receives the data to save it, update the UI, or show an error.
</Note>

<Tip>
  Looking for framework-specific setups? See [Framework Examples](/public-embedded-signup-sdk/framework-examples) for Vanilla JS, React / Next.js, and Vue.js.
</Tip>

The only server-side piece you need is the `/api/session` proxy — see [Backend Integration](/public-embedded-signup-sdk/backend-integration).
