Browser Agent SDK

Learn how to implement the Browser Agent SDK to join Cobrowse and screen share sessions, manage viewer windows, and register event listeners.

Browser Agent SDK

This SDK can be included by a Partner or Customer agent-side web application to:

  • Join a Glance screen share, Cobrowse, or 2-way mobile video session.
  • Lookup a session, or wait for a session to start.
  • Open a new window to connect to a session.
  • Receive lifecycle and error events from cobrowse and screenshare sessions including agent video.
  • Close the session viewer window.

Partner Implementation

Step 1: Include the Glance JavaScript The partner should include the script https://storage.glancecdn.net/agent/js/GlanceAgent_6.55.0M.js in their agent web application.

Step 2: Register for events Register for events by calling GLANCE.Agent.addEventListener and/or GLANCE.Agent.addEventListenerAll.

Step 3: Authenticate the Agent The customer application should call GLANCE.Agent.authenticate with a credentials object containing partnerid, partneruserid, and loginkey. These parameters are stored within the GLANCE namespace and used to authenticate the user for Glance web services.

Step 4: Join a session Join a session by using one of the following methods:

  • GLANCE.Agent.joinSession
  • GLANCE.Agent.openViewer: This method can be used to avoid lookup requests if the session is known to be running. If SSO is not being used, openViewer can be called without calling authenticate, and the agent will simply be prompted to log in with their username and password.

Example Implementations