Notify - getTokens()

Get 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
None
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]);
}

Output: