Use a browser embed
Prerequisites
- Browser embeds enabled for your project
- Your site’s origin on the Origins allowlist
- An
experienceId(e.g.exp_…)
Steps
Install the SDK —
npm install @liforma/clientor load the CDN scriptAdd the component — pass your
experienceIdAllowlist origins — every production host that embeds the experience
Test — open your page, grant microphone permission, speak
Optional personalization — pass
runtimeContext={{ first_name: customer.firstName }}on<Experience>. Prop changes update the next turn and do not mint a new session.
Checklist
- Component has a sized container
- Page is served over HTTPS in production
- Origin matches allowlist exactly (scheme + host + port)
- Browser supports Web Speech API for voice input
When to prefer a server session
If you already have a backend, mint with an API key on the server instead. Origins are the client-only path; they exist so third parties cannot embed your experience on unapproved sites.
Troubleshooting
If the experience fails to start, check the browser console. Common issues: origin not allowlisted (403), browser embeds disabled for the project, or microphone permission denied.
See Errors for HTTP status codes.