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()

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

Notify - getTokens()

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

This function uses the currently logged-in user record as the client.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
String The client tokens, as a JSON string.

// get Notify Client Tokens per active Notify Driver for the currently logged in user
var json = new SNC.Notify().getTokens();

// parse the json that was return into a tokens object
var tokens = JSON.parse(json);

// log line
gs.log('Notify Client Tokens for the currenty logged in user');

// iterate over the driver tokens
for (var driver in tokens) {
    gs.log(driver + ' Driver token: ' + tokens[driver]);