<main>
<article class="userContent">
<p>This usecase describes example steps of the configuration and API usage which are needed to integrate the CoBrowsing / LiveView functionality in another system.</p><h2 data-id="1.-configuration">1. Configuration</h2><p>In the plugin configuration of the backend, activate the LiveView plugin. We used the following configuration in our example.</p><div class="embedExternal embedImage display-large float-none">
<div class="embedExternal-content">
<a class="embedImage-link" href="https://us.v-cdn.net/6032394/uploads/GWKW9YWB4BZX/image.png" rel="nofollow noreferrer noopener ugc" target="_blank">
<img class="embedImage-img" src="https://us.v-cdn.net/6032394/uploads/GWKW9YWB4BZX/image.png" alt="image.png" height="141" width="707" loading="lazy" data-display-size="large" data-float="none"></img></a>
</div>
</div>
<h2 data-id="2.-script-implementation">2. Script Implementation</h2><p>The JavaScript has to be integrated in each webpage where we want to cobrowse.</p><p><a href="https://docs.chatvisor.com/docs/setup20_implementation-javascript" rel="nofollow noreferrer ugc">Learn how to implement the LiveView on your page.</a></p><h2 data-id="3.-start-and-stop-the-cobrowse-liveview-session">3. Start and stop the CoBrowse / LiveView session</h2><p>We will start or stop the LiveView session with these functions <code class="code codeInline" spellcheck="false" tabindex="0">CV.cobrowse.start()</code> and <code class="code codeInline" spellcheck="false" tabindex="0">CV.cobrowse.stop()</code>. Therefore we simply implement a button where the user can click on it and starts the session.</p><p><em>If you don't want a button for a optin, you can simply deactivate the option configuration at step 1.</em></p><p>How long does a session last? <a href="https://docs.chatvisor.com/docs/config04_css_live-view#what-is-a-session" rel="nofollow noreferrer ugc">Go to page</a></p><h2 data-id="4.-generate-a-join-url-for-the-agent">4. Generate a join URL for the agent</h2><p>After the session is successfully started, we can now generate a public URL where the agent can join the session. For this we need the <a href="https://docs.chatvisor.com/docs/jsapi01-cobrowsing#get-share-id" rel="nofollow noreferrer ugc"><code class="code codeInline" spellcheck="false" tabindex="0">shareId</code></a> or the <a href="https://docs.chatvisor.com/docs/jsapi01-cobrowsing#get-session-id" rel="nofollow noreferrer ugc"><code class="code codeInline" spellcheck="false" tabindex="0">sessionId</code></a> to join generate the URL through the REST API.</p><p>Authenticate and generate an API token <a href="https://developers.chatvisor.com/#section/Authentication" rel="nofollow noreferrer ugc">Go to documentation</a></p><p>Afterwards we can simply send a GET request to the API endpoint which is described in the following link. In front of that we have to transfer the <code class="code codeInline" spellcheck="false" tabindex="0">shareId</code> or the <code class="code codeInline" spellcheck="false" tabindex="0">sessionId</code> to the server to identify the session and afterwards we can generate the URL which can be opened without authentication.</p><p><a href="https://developers.chatvisor.com/#tag/Public-Link" rel="nofollow noreferrer ugc">REST API to generate a public join URL</a></p><p>This is a unique URL which is signed with a token and is always bound to the session with the given ID.</p>
</article>
</main>