Embedding Reach into your application is straightforward and flexible.Documentation Index
Fetch the complete documentation index at: https://docs.embedreach.com/llms.txt
Use this file to discover all available pages before exploring further.
Creating a Container Element
First, create a div element that will serve as the container for the Reach interface:Importing the SDK
There are two approaches to importing the SDK:Option 1: Dynamic Script Loading (Recommended for React/Next.js)
For React or Next.js applications, be sure to clean up the script on component unmount:
Option 2: Using a Script Tag
Initializing the SDK
Once the script is loaded, initialize the SDK with your configuration:The
authToken must be a valid tenant-scoped JWT token. See Authentication for token requirements.Security Headers (CSP)
If your application enforces security headers like Content Security Policy, add the following sources to allow the SDK to load and render the embedded interface:- These directives are for the embeddable UI SDK. The script is served
from
https://cdn.embedreach.comand the iframe is hosted on the same domain; API requests go tohttps://api.embedreach.comfrom inside the iframe. - If you are installing the website attribution snippet instead, that script has different CSP needs. See the Attribution setup guide for details.
Iframe sandbox and permissions
The SDK creates the Reach iframe with a restrictivesandbox attribute and grants only the tokens needed for the product to run. The sandbox token list is:
allow-scripts— Run JavaScript inside the embedded UIallow-same-origin— Treat the iframe as same-origin withcdn.embedreach.comfor storage and APIs used by the appallow-forms— Submit forms inside the embedded UIallow-popups— Open new browsing contexts (for examplewindow.openortarget="_blank")allow-popups-to-escape-sandbox— New windows opened from the iframe are not sandbox-restricted, so third-party pages that use strict response headers can load correctly (for example partner booking or intake flows opened in a new tab)allow-downloads— Trigger file downloads from the embedded UI where supported
allow="microphone" so Voice features can request microphone access when your host page and browser policy permit it.