Widget Embed Snippet
ethora-widget-embed-snippetGenerate the tag that embeds the Ethora AI chat widget (the floating launcher + chat panel that website visitors use) for an app, plus the prerequisites that must hold before it answers. No API call; pure generator using this deployment's hosted widget URL and public API base. The widget answers with the app's ACTIVE bot: for API-created apps run ethora-agents-create-v2 -> ethora-agent-invite-to-chat -> ethora-agents-activate-v2 { agentId, chatJid } first, otherwise POST /v2/widget/sessions returns 422 and the widget stays silent.
Auth: none required (uses the selected app when appId is omitted). Errors: effectively none; when no hosted widget is configured the snippet carries a <WIDGET_URL> placeholder. Related: ethora-agents-activate-v2, ethora-bot-widget-v2 (legacy per-app bot only).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appId | No | App the widget belongs to (24-char hex). Defaults to the app from `ethora-app-select`. | |
| botId | No | Legacy `data-bot-id` (bot XMPP address); only for old embeds. Prefer `appId`: the backend picks the active agent from the app. | |
| locale | No | UI locale (`data-locale`), e.g. `en`, `fr`, `es`. | |
| apiBase | No | Override the public API base (`data-api-base`). Defaults to this deployment's public API URL. | |
| botName | No | Display name shown in the widget header (`data-bot-name`), e.g. the agent's name. | |
| greeting | No | Greeting shown when the panel opens (`data-greeting-message`). | |
| position | No | Launcher corner (`data-position`). | |
| botAvatar | No | Avatar image URL shown for the bot (`data-bot-avatar`). | |
| widgetUrl | No | Override the widget bundle base URL (the script is `<widgetUrl>/assistant.js`). | |
| primaryColor | No | Brand colour for launcher and bubbles (`data-primary-color`), e.g. `#0052CC`. |