Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.
  • Madrid
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store

Notify - getTokens(GlideRecord record)

Log in to subscribe to topics and get notified when content changes.

Notify - getTokens(GlideRecord record)

Get client tokens for any installed telephony drivers for use in WebRTC or mobile clients.

Table 1. Parameters
Name Type Description
record GlideRecord A record used to generate the client tokens.
Table 2. Returns
Type Description
String The client tokens. The value of the string depends on the GlideRecord parameter.

This example demonstrates getting Notify client tokens for every Notify group.

// instantiate Notify
var notify = new SNC.Notify();

// get all Notify Groups
var notifyGroup = new GlideRecord("notify_group");

// iterate over all notify groups
while ( {
    // generate Notify Client tokens per active Notify Driver for this group
    var json = notify.getTokens(notifyGroup);
    var tokens = JSON.parse(json);

    for (var driver in tokens) {
        gs.log(gs.getMessage("Notify Client token for {0} driver and Notify Group '{1}': {2}", [driver, notifyGroup.getValue('name'), tokens[driver]]));