Authentication Token

An Authentication Token can be used to securely communicate with a service. It's a JWT token that contains customerId, adminId, environment and msid. An integration for the service must be defined in the Frontend Tokens section in EMS Admin. Calling the getter function with the name of the integration will return a promise that will be resolved with an Authentication Token.

It works in iframes as well, but the UI Kit must be present on top window otherwise the promise won't resolve. The promise will be rejected if top window's domain is not whitelisted in Suite configuration.

JavaScript
window.e.utils.getAuthenticationToken('myIntegration').then(token => {
  return getDataFromBackend(token);
});

Creating Authentication Token Service

Method

NameDescription
window.e.utils.getAuthenticationToken(integration)Returns promise that resolves with an Authentication Token.