Visitor widget embed

Add chat to your public site.

Copy the embed snippet from Dashboard → Chat → your application. It injects an async script that loads the hosted visitor bundle.

Recommended embed (from dashboard)
<script type="text/javascript">
var SohojX_Chat=SohojX_Chat||{}, SohojX_Chat_LoadStart=new Date();
(function(){
var s1=document.createElement("script"),s0=document.getElementsByTagName("script")[0];
s1.async=true;
s1.src='https://platform.sohojx.com/chat/embed/cap_YOUR_APP_ID/wk_YOUR_WIDGET_KEY';
s1.charset='UTF-8';
s0.parentNode.insertBefore(s1,s0);
})();
</script>

Legacy script tag

html
<script async src="https://platform.sohojx.com/chat/visitor-widget.js"
  data-chat-application-id="cap_xxx" data-widget-key="wk_xxx"></script>

Pop-out window

Visitors can open a fullscreen chat from the widget menu or you can link directly:

text
https://platform.sohojx.com/chat/popout?chatApplicationId=cap_xxx&widgetKey=wk_xxx

Visitor APIs (widget)

  • GET https://platform.sohojx.com/api/chat/visitor/config — branding, fields, agents (uses cap_ + wk_ + origin).
  • POST https://platform.sohojx.com/api/chat/visitor/session — start or resume session; pass chatVisitorId when identified.
  • Messages, uploads, and conversation endpoints use the session token from the widget (not your application secret).
Visitor widget embed · Central Auth Docs | SohojX Platform