Installation
Paste this snippet anywhere within the <body> of the page. Replace the
data-key with your widget key from the Slack app install flow.
<script id="slackchat-embed" src="https://popagent.forslack.io/embed.min.js" data-key="YOUR_WIDGET_KEY" defer ></script>
What happens next?
- New visitors open a fresh Slack channel in your workspace.
- Agents reply directly from Slack, no additional dashboard needed.
- Transcripts stay in Slack for easy follow-up and accountability.
Domain whitelisting for production
The widget only loads on approved domains. This prevents unknown sites from embedding your widget key and opening unauthorized Slack channels.
Why it matters
Without a whitelist, any website could reuse your widget key and send messages into your workspace. Lock down production domains as soon as you go live.
Recommended checklist
- Add your primary domain and any subdomains that host the widget.
- Keep staging and localhost out of the production allowlist.
- Revisit the list when you launch new marketing sites.
Testing locally with the dev secret
Use the dev-secret query parameter (or configuration override) while testing on
localhost or staging. It is designed for safe, temporary access.
https://localhost:3000/?dev-secret=YOUR_DEV_SECRET
Dev override behavior
The dev secret always overrides domain validation. That means even if your domain is not in the production allowlist, the widget will load as long as the correct dev secret is supplied.
Pro tip
It is meant for internal testing and should never ship in public-facing HTML.