Tutorial: Getting started

Getting started

The Embed SDK provides a mechanism to embed the webclient in a browser page and programatically interact with host sessions.

The library is packaged with the session server and available at <hacloud-server>/connector/zfe-embed-sdk.js.

A basic example

A functional page can be created quickly with minimal code.

<!DOCTYPE html>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>Embed SDK Basics</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src="https://zfe.company.com:7443/connector/zfe-embed-sdk.js"></script>
    <div id="my-host-app" style="width: 800px; height: 600px"></div>
      // Create the connector
      var zfe = new ZFE.ZFE({
        url: 'https://zfe.company.com:7443/',
        username: 'johnsm',
        password: '12345',
        domain: 'CORPDOM',
        target: document.getElementById('my-host-app')
      // Connect to the session server
        .then(function() {
          console.log('The SDK is connected and ready to use');
        .catch(function(error) {
          console.error('There was an error connecting to the session server', error);