Skip to content

KAZOO Support Channels

This documentation is curated by 2600Hz as part of the KAZOO open source project. Join our community forums here for peer support. Only features in the docs.2600hz.com/supported space are included as part of our 2600Hz Support Services plan.

monster.util.getAuthToken()#

Syntax#

monster.util.getAuthToken([connectionName]);

Parameters#

Key Description Type Default Required
connectionName If specified, will return the value of the token of a specific connection. String false

Return value#

A String representing the authentication token used by the specified connection.

Description#

This method returns a token linked to a connection given in parameter, and if no connection is specified, it will use the Kazoo connection.

Examples#

Before being logged in to Kazoo#

monster.util.getAuthToken();
// output: undefined;

After being logged in#

monster.util.getAuthToken();
// output: 'd1jhkodj2n1odj12d1.d21dkj21kod12.d21d12d1212', example of a token returned by kazoo

monster.util.getAuthToken('myConnection');
// returns the token stored in your connection if you created one.
// This is an advanced use case and shouldn't be used at the moment.