Browser Agent API
This API 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
-
Include the Glance JavaScript
- The partner should include the script https://storage.glancecdn.net/agent/js/GlanceAgent_6.35.0M.js in their agent web application.
-
Register for events
- Register for events by calling
GLANCE.Agent.addEventListener
and/orGLANCE.Agent.addEventListenerAll
.
- Register for events by calling
-
Authenticate the Agent
- The customer application should call
GLANCE.Agent.authenticate
with a credentials object containingpartnerid
,partneruserid
,loginkey
.These parameters are stored within the GLANCE namespace and used to authenticate the user for Glance web services.
- The customer application should call
-
Join a session by one of the following methods:
GLANCE.Agent.joinSession
GLANCE.Agent.openViewer
openViewer
can be used to avoid lookup requests if the session is known to be running.- Or if SSO is not being used
openViewer
can be called without callingauthenticate
and the agent will be prompted to login with their username and password.
Example Implementations
- Using
joinSession
: https://storage.glancecdn.net/agent/samples/6_35_0/AgentTest.html - Using
openViewer
: https://storage.glancecdn.net/agent/samples/6_35_0/AgentTest1.html