Presence Agent REST API

The Glance Presence Agent REST API offers the same functionality as the JavaScript GLANCE.Presence.Agent API, with the exception of connect() which relies on WebSockets. The REST API is useful for implementing server side agent console functionality.


The Presence service consists of a load balancer at as well as multiple named Presence Servers at,, etc. Presence data can be queried by invoking the JSON REST API on the Presence Service at Signaling specific visitors must be done by finding the instance that the visitor is currently connected to (via /findvisitor), then invoking the REST API on that server.


All Presence Agent REST API entry points expect an authorization token to be send in an Authorization header as follows:
Authorization : Bearer [authorization token]

The Authorization Token can be obtained using the Authorization API.

REST API Endpoints

The Presence service supports the following REST endpoints:



Returns the Presence information for a particular visitor.



Returns the specific named Presence server that the visitor is currently connected to:

  visitorfound : {
  direct : [<i>server</i>]

If the visitor is not present on the website, the server returns:

  visitorfound : false


Signals the specified visitor, passing a JSON message. There must be a connected GLANCE.Presence.Visitor instance on the visitor side to receive the signal.

POST https://[directserver]/signalvisitor?groupid=[groupid]&visitorid=[visitorid]

The body of the request is the JSON message to send. The message should have the following format:

  mtype : [message type],
  data : [message payload]

The message type can be "invoke", to invoke a GLANCE JavaScript function on the visitor:

  mtype: "invoke",
  data: {func: "GLANCE.Cobrowse.Visitor.startSession"}

Alternatively, message type "signal" can be specified to send a custom message. When the visitor side receives the message, the event handler onsignal(), if defined, will be called on the Visitor instance.

For example:

  mtype: "signal",
  data: {
    command : "startchat",
    chatid: "56789"

will result in onsignal ({ command : "startchat", chatid: "56789"}) being called on the GLANCE.Presence.Visitor instance.



Returns Presence information for all visitors currently present in the specified group.

By continuing to use the site, you agree to the use of cookies. Learn More