EmbedConfig

EmbedConfig

The configuration object for embedding ThoughtSpot content. It includes the ThoughtSpot hostname or IP address, the type of authentication, and the authentication endpoint if a trusted authentication server is used.

PropertiesπŸ”—

authEndpointπŸ”—

authEndpoint: string

Optional

[AuthServer] The trusted authentication endpoint to use to get the authentication token. A GET request is made to the authentication API endpoint, which returns the token as a plaintext response. For trusted authentication, the authEndpoint or getAuthToken attribute is required.

authTriggerContainerπŸ”—

authTriggerContainer: string | HTMLElement

Optional

For inPopup SAMLRedirect or OIDCRedirect authentication, we need a button that the user can click to trigger the flow. This attribute sets a containing element for that button.

Version : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw

init({
  authType: AuthType.SAMLRedirect,
  inPopup: true,
  authTriggerContainer: '#auth-trigger-container'
})

authTriggerTextπŸ”—

authTriggerText: string

Optional

Text to show in the button which triggers the popup auth flow. Default: Authorize.

Version : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw

authTypeπŸ”—

authType: AuthType

The authentication mechanism to use.

autoLoginπŸ”—

autoLogin: boolean

Optional

Re-login a user with the previous login options when a user session expires.

default : false

blockNonEmbedFullAppAccessπŸ”—

blockNonEmbedFullAppAccess: boolean

Optional

Prevent users from accessing the full application or ThoughtSpot application pages access to the embedded application users outside of the iframe.

Version : SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw

default : true

callPrefetchπŸ”—

callPrefetch: boolean

Optional

Calls the prefetch method internally when set to true

default : false

currencyFormatπŸ”—

currencyFormat: string

Optional

Format to be used for currency when currency format is set to infer from browser

Version : SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw

customizationsπŸ”—

customizations: CustomisationsInterface

Optional

Custom style params for embed Config.

Version : SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw

dateFormatLocaleπŸ”—

dateFormatLocale: string

Optional

Overrides default/user preffered locale for date formatting

Version : SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw

detectCookieAccessSlowπŸ”—

detectCookieAccessSlow: boolean

Optional

[AuthServer|Basic] Detect if third-party party cookies are enabled by doing an additional call. This is slower and should be avoided. Listen to the NO_COOKIE_ACCESS event to handle the situation.

This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.

Version : SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw

disableLoginFailurePageπŸ”—

disableLoginFailurePage: boolean

Optional

This flag is used to disable showing the login failure page in the embedded app.

Version : SDK 1.32.3 | Thoughtspot: *

disableLoginRedirectπŸ”—

disableLoginRedirect: boolean

Optional

Disable redirection to the login page when the embedded session expires This flag is typically used alongside the combination of authentication modes such as AuthType and auto-login behavior EmbedConfig.autoLogin

Version : SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw

default : false

disableSDKTrackingπŸ”—

disableSDKTracking: boolean

Optional

Disables the Mixpanel tracking from the SDK.

Version : SDK: 1.27.9

ignoreNoCookieAccessπŸ”—

ignoreNoCookieAccess: boolean

Optional

Ignore the cookie access alert when third-party cookies are blocked by the user’s browser. If you set this to true, the embedded iframe behaviour persists even in the case of a non-logged-in user.

default : false

inPopupπŸ”—

inPopup: boolean

Optional

[SSO] For SSO Authentication, if inPopup is set to true, it will open the SAML auth flow in a popup, instead of redirecting the browser in place.

Need to use this with authTriggerContainer. Or manually trigger the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.

Version : SDK: 1.18.0

default : false

logLevelπŸ”—

logLevel: LogLevel

Optional

Log level for the SDK.

Version : SDK: 1.26.7 | ThoughtSpot: 9.10.0.cl

default : LogLevel.ERROR

init({
  ...embedConfig,
  logLevel: LogLevel.SILENT
})

loginFailedMessageπŸ”—

loginFailedMessage: string

Optional

This message is displayed in the embedded view when a user login fails.

Version : SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw

noRedirectπŸ”—

noRedirect: boolean

Optional

[SSO] For SSO Authentication, if noRedirect is set to true, it will open the SAML auth flow in a popup, instead of redirecting the browser in place.

default : false

numberFormatLocaleπŸ”—

numberFormatLocale: string

Optional

Overrides default/user preffered locale for number formatting

Version : SDK: 1.28.4 | Thoughtspot: 10.0.0.cl, 9.5.0.sw

passwordπŸ”—

password: string

Optional

[Basic] The ThoughtSpot login password corresponding to the username

Warning: This feature is primarily intended for developer testing. It is strongly advised not to use this authentication method in production.

pendoTrackingKeyπŸ”—

pendoTrackingKey: string

Optional

Pendo API key to enable Pendo tracking to your own subscription, the key is added as an additional key to the embed, as per this document.

Version : SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl

queueMultiRendersπŸ”—

queueMultiRenders: boolean

Optional

When there are multiple objects embedded, queue the rendering of embedded objects to start after the previous embed’s render is complete. This helps improve performance by decreasing the load on the browser.

Version : SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1

default : false

redirectPathπŸ”—

redirectPath: string

Optional

[SSO] For SSO Authentication, one can supply an optional path param; This will be the path on the host origin where the SAML flow will be terminated.

Eg: "/dashboard", "#/foo" [Do not include the host]

Version : SDK: 1.10.2 | ThoughtSpot 8.2.0.cl, 8.4.1.sw

shouldEncodeUrlQueryParamsπŸ”—

shouldEncodeUrlQueryParams: boolean

Optional

Boolean to define if the query parameters in the ThoughtSpot URL should be encoded in base64. This provides additional security to Thoughtspot clusters against cross-site scripting attacks.

default : false

suppressErrorAlertsπŸ”—

suppressErrorAlerts: boolean

Optional

If passed as true all alerts will be suppressed in the embedded app.

Version : SDK: 1.26.2 | ThoughtSpot: *

suppressNoCookieAccessAlertπŸ”—

suppressNoCookieAccessAlert: boolean

Optional

Suppress cookie access alert when third-party cookies are blocked by the user’s browser. Third-party cookie blocking is the default behaviour on some web browsers like Safari. If you set this attribute to true, you are encouraged to handle noCookieAccess event, to show your own treatment in this case.

default : false

suppressSageEmbedBetaWarningπŸ”—

suppressSageEmbedBetaWarning: boolean

Optional

Hide beta alert warning message for SageEmbed.

suppressSearchEmbedBetaWarningπŸ”—

suppressSearchEmbedBetaWarning: boolean

Optional

Hide the beta alert warning message for SearchEmbed.

Version : SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*

thoughtSpotHostπŸ”—

thoughtSpotHost: string

The ThoughtSpot cluster hostname or IP address.

useEventForSAMLPopupπŸ”—

useEventForSAMLPopup: boolean

Optional

Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger SAML popup. This is useful when you want to trigger the popup on a custom user action.

usernameπŸ”—

username: string

Optional

[AuthServer / Basic] The user name of the ThoughtSpot user. This attribute is required for trusted authentication.

MethodsπŸ”—

getAuthTokenπŸ”—

getAuthToken() : Promise< string >

[AuthServer] A function that invokes the trusted authentication endpoint and returns a Promise that resolves to the auth token string. For trusted authentication, the authEndpoint or getAuthToken attribute is required.

It is advisable to fetch a new token inside this method and not reuse the old issued token. When auth expires this method is called again and if it is called with an older token, the authentication will not succeed.

Returns

Promise< string >

Defined in : types.ts