Widget Attributes
The production widget supports these integration attributes:
access-tokenthread-refenable-page-contexttheme
<docuworm-chat access-token="worm_xxx_your_token" thread-ref="case_12345" enable-page-context theme="dark"></docuworm-chat>access-token (required)
Section titled “access-token (required)”Type: string
Access token generated in Agents → API Keys on dashboard.docuworm.ai.
<docuworm-chat access-token="worm_xxx_your_token"></docuworm-chat>If the current page origin is not in the token’s allowed URL list, authentication fails.
thread-ref (recommended)
Section titled “thread-ref (recommended)”Type: string
A stable external reference used to map your app entity to one Docuworm thread.
<docuworm-chat access-token="worm_xxx_your_token" thread-ref="order_98231"></docuworm-chat>Use values like:
case_12345ticket_991order_98231account_42
enable-page-context (optional)
Section titled “enable-page-context (optional)”Type: boolean attribute
Default: false
When enabled, page content can be included with user prompts.
<docuworm-chat access-token="worm_xxx_your_token" thread-ref="case_12345" enable-page-context></docuworm-chat>You should pair this with agent-level settings from dashboard.
theme (optional)
Section titled “theme (optional)”Type: "dark" | "light"
Default: "dark"
<docuworm-chat access-token="worm_xxx_your_token" theme="dark"></docuworm-chat><docuworm-chat access-token="worm_xxx_your_token" theme="light"></docuworm-chat>Recommended production configuration
Section titled “Recommended production configuration”<docuworm-chat access-token="worm_xxx_prod_token" thread-ref="case_{{id}}" enable-page-context theme="dark"></docuworm-chat>