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.canImpersonate()#

Syntax#

monster.util.canImpersonate([accountId]);

Parameters#

Key Description Type Default Required
accountId Account ID of the account that you want to impersonate a user from. Object false

Return value#

A Boolean indicating whether or not the current or specified account is allowed to impersonate users.

Description#

We only let super duper admins impersonate users from subaccounts. If you're not a super duper admin, or if you're using the account you logged in with, you shouldn't have access to impersonating. We use this method to make sure that the user has the right to try to impersonate a user.

Examples#

Check if a specific account allow impersonation#

if(monster.util.canImpersonate('123412341234123412341234')) {
    // do something if user can impersonate
};