Install the widget
Add the snippet to pages where chat should be available.| Attribute | Required | Purpose |
|---|---|---|
src | Yes | Loads the hosted Woes widget script. |
data-public-key | Yes | Identifies the workspace for public widget requests. |
data-api | Yes | Points the widget at the Woes widget message route for your deployment. |
The widget public key is intentionally public. It identifies the workspace but does not grant general table, admin, or authenticated workspace access.
Identify signed-in customers
When your app knows the customer, pass stable identity and display context.Add page context
Context helps operators understand where the question came from.- Short.
- Operational.
- Safe for operators to see.
- Helpful for reproducing the issue.
Conversation history
Conversation history requires the per-conversation history secret issued for that conversation. Verified customer identity does not replace that secret. This separation protects customers from one public workspace key being enough to read arbitrary conversation history.Test the installation
Load the page
Open the page with the widget installed. Use a private browser session for a clean first-run test.
Check the inbox
Confirm the conversation appears in Woes with the expected channel, identity, and page context.
Security model
The public widget route is narrower than authenticated workspace routes. It should:- Accept requests for the workspace identified by the public key.
- Validate payloads and route controls.
- Avoid broad database access.
- Avoid returning internal notes, secrets, or unrelated workspace data.
- Keep operator-only diagnostics out of customer responses.
Troubleshooting
The widget does not appear
The widget does not appear
Confirm the script URL is reachable,
data-public-key is present, data-api is correct, and your content security policy allows the script.Messages do not arrive in Woes
Messages do not arrive in Woes
Confirm the workspace public key is correct, the widget API route is deployed, the origin is allowed, and the payload is within route limits.
Customer identity is missing
Customer identity is missing
Confirm
window.Woes("identify", ...) runs after the shim is loaded and before or near the first customer message.History does not continue after refresh
History does not continue after refresh
Confirm the browser has the conversation state and that the per-conversation history secret is present and valid.
