Skip to main content
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.

Browser Security Headers

Meta Embedded Signup uses an OAuth popup and a cross-origin relay iframe.
If your application configures CSP or COOP headers, apply the following
requirements before launching the SDK.

Cross-Origin-Opener-Policy

Do not serve the page with:
Use:

Content Security Policy

Add the following origins to your existing CSP directives:
Do not replace your application’s existing CSP directives. Append these origins to the existing values. Replacing them may break payment, CAPTCHA, analytics, or other application frames.
Enable debug: true while testing.
  • fb_login_timeout: Meta’s FB.login callback did not return within 15 minutes. Check the page’s Cross-Origin-Opener-Policy header.
  • meta_finish_timeout: The OAuth callback returned, but Meta did not send the terminal Embedded Signup message within 60 seconds. Check frame-src and the Meta message diagnostics.
apiBaseUrl is optional. When it is provided, the SDK uses it as the base URL for its Embedded Signup API requests. When it is omitted, the existing default Connexease API URLs continue to be used.Provide only the base URL, such as https://your-gateway-api.example.com. Do not append /api/v1/wa/embedded-signup because the SDK adds the required paths automatically.
Never expose your secret key in frontend code or pass it to launch() in a production integration. The sk_… key must stay on your server and should only be used by your /api/session backend endpoint.
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 by itself.The onSuccess, onError, and onCancel callbacks continue to run when debug is false. If your callback code writes its payload to the console, guard that console statement with the same debug flag.Keep debug logging disabled in production.
Looking for framework-specific setups? See Framework Examples for Vanilla JS, React / Next.js, and Vue.js.
The only server-side piece you need is the /api/session proxy — see Backend Integration.