Skip to main content
Embed Meta WhatsApp Business (Cloud API & Coexistence) onboarding directly into your product. The SDK renders its own interface as isolated Shadow-DOM modals and opens Meta Embedded Signup through Meta’s OAuth popup. The SDK renders the entire flow as isolated Shadow-DOM modals on top of your page. Package: @connexease/gateway-embedded-signup · Version: 1.0.5

Installation

Install Connexease script from CDN.

Quickstart

Render the connect button in a few lines.

Backend Integration

The session-token endpoint your server exposes.

How It Works

The SDK follows the Stripe Connect pattern: a publishable key lives in the browser, a secret key stays on your server, and a short-lived session token bridges the two. Connexease gives you both keys from the dashboard, under Dashboard → avatar menu (top right) → My ProfileOrganization tab. See Authentication for how to create each key and configure allowed origins.
Step by step:
  1. Initialize — call init() once with your publishable key. You can optionally provide apiBaseUrl to use your own Gateway API base URL.
  2. Launch — the user clicks your button → you call launch() and provide the callbacks for that flow.
  3. WhatsApp signup — the SDK runs the Meta WhatsApp Embedded Signup popup and handles the whole connection.
  4. Done — the SDK fires:
    • onSuccess with the connected WhatsApp account details,
    • onError when the flow fails,
    • onCancel when the user cancels or closes the flow.
Your only jobs are to expose a session-token endpoint on your backend and handle the callbacks. The SDK takes care of the Meta popup, OAuth, and the connection for you.

Prerequisites

  1. A publishable key (pb_…) from the Connexease dashboard — safe to ship in the browser. See Publishable Key.
  2. A secret key (sk_…) stored securely on your server — never in the browser. See Secret Key.
  3. Your site’s origin added to the allowed-origins list in the Connexease dashboard — otherwise the flow is rejected because the origin isn’t allowed. http://localhost:3000 is allowed by default, and a newly added origin can take up to 48 hours to be approved by Meta. See Allowed Origins.
  4. Browser security headers configured for Meta Embedded Signup: Cross-Origin-Opener-Policy: same-origin-allow-popups and the required Facebook origins in frame-src. See Browser Security Headers.