LLMs.txt: Complete documentation index for AI agents
Global embed configuration

Global embed configuration

The global embed configuration is the object that you pass to init(). Its options apply to every embedded component on the page, for example authentication, number and date formats, and appearance. Each embedded component also has its own view configuration for settings that apply to that component only. For the full list of global options, see EmbedConfig.

View configuration settingsπŸ”—

For options that you can set in both places, such as isDarkMode and additionalFlags, the value in the view configuration takes precedence over the value in init(). For example, you can set isDarkMode: true in init() and isDarkMode: false in the view configuration of one embed to render that embed in the default appearance.

Global configuration propertiesπŸ”—

Pass the global configuration to init() when your application loads, before you create any embedded component. thoughtSpotHost and authType are required. All other properties are optional.

import { init, AuthType, LogLevel } from '@thoughtspot/visual-embed-sdk';

init({
    thoughtSpotHost: '<ThoughtSpot-host>',
    authType: AuthType.TrustedAuthTokenCookieless,
    getAuthToken: () => fetchAuthTokenFromYourServer(),
    isDarkMode: false,
    logLevel: LogLevel.ERROR,
});

The following table lists commonly used properties. For the complete list, types, default values, and the SDK and ThoughtSpot versions that support each property, see EmbedConfig.

PropertyDescription

thoughtSpotHost

The hostname or IP address of the ThoughtSpot cluster. Required.

authType

The authentication method, such as AuthType.TrustedAuthTokenCookieless or AuthType.None. Required. For more information, see Authentication.

authEndpoint or getAuthToken

For trusted authentication, the endpoint that returns the authentication token, or a function that returns a Promise that resolves to the token. Set one of them.

username

The ThoughtSpot user name. Required for trusted authentication.

autoLogin

Signs the user in again with the previous login options when the session expires. The default value is false.

customizations

Style and text customization for the embedded app. For more information, see Customize UI layout and styles.

customActions

Custom actions that you define in code. For more information, see Code-based custom actions.

isDarkMode

Renders the embedded app in dark appearance. See Dark mode.

numberFormatLocale, dateFormatLocale, and currencyFormat

Override the user’s preferred locale for number and date formatting, and set the currency format.

logLevel

The types of messages that the SDK and the embedded app show in the browser console. The default value is LogLevel.ERROR.

suppressErrorAlerts

Suppresses all alerts in the embedded app when set to true.

queueMultiRenders

Queues the rendering of multiple embedded objects so that each one starts after the previous one finishes. This decreases the load on the browser. The default value is false.

additionalFlags

Advanced flags, such as excludeConfigFromURL. See Configuration settings for a compact iframe URL.

Dark modeπŸ”—

Set isDarkMode to true to render embedded ThoughtSpot content in dark appearance. The default value is false. Your application controls the appearance of the embed, so this setting overrides the appearance preference of the signed-in user and the color scheme of the operating system.

init({
    thoughtSpotHost: '<ThoughtSpot-host>',
    authType: AuthType.None,
    isDarkMode: true,
});

To switch an open embed between dark and default appearance without reloading it, trigger HostEvent.UpdateTheme with an isDarkMode value. For example, use it to keep the embed in step with a theme switch in your application.

liveboardEmbed.trigger(HostEvent.UpdateTheme, { isDarkMode: false });

The event resolves with the applied value, such as { isDarkMode: false }. If dark appearance is not available in the embed, the embed does not change, and the event rejects with an error message.

Note

Dark mode requires Visual Embed SDK v1.55.0 or later and ThoughtSpot Cloud 26.12.0.cl or later. For more information, see isDarkMode, HostEvent.UpdateTheme, and UpdateThemeRequest.

How the SDK passes configuration to the embedded appπŸ”—

The SDK has two ways to pass embed configuration to the embedded ThoughtSpot app:

  • Iframe URL (default): The SDK adds the configuration to the iframe URL as query parameters.

  • postMessage: The SDK keeps only the parameters that the app needs at startup on the URL, and sends the rest to the app in a postMessage when the app loads.

You choose the method by using the excludeConfigFromURL flag.

Configuration settings for a compact iframe URLπŸ”—

By default, the iframe URL includes the embed configuration. This can make the URL very long and make the values visible in the page DOM, browser tools, and proxy logs. The excludeConfigFromURL flag moves most of the configuration out of the URL.

If you use Visual Embed SDK v1.55.0 or later with ThoughtSpot Cloud 26.12.0.cl or later, set excludeConfigFromURL to true in the additionalFlags object to generate a compact iframe URL.

Set the flag in init() to apply it to all embeds, or in the view configuration of one embed. The view configuration value takes precedence, so false in a view configuration turns the flag off for that embed.

init({
    thoughtSpotHost: '<ThoughtSpot-host>',
    authType: AuthType.None,
    additionalFlags: { excludeConfigFromURL: true },
});

// Keep the configuration of this embed on the URL
const liveboardEmbed = new LiveboardEmbed('#tsEmbed', {
    liveboardId: '<liveboard-guid>',
    additionalFlags: { excludeConfigFromURL: false },
});
Note

The additionalFlags object is intended for advanced use. Hence, exercise caution.

Comparison with the flag on or offπŸ”—

AspectFlag off (default)Flag on

Where most configuration goes

The SDK adds it to the iframe URL as query parameters.

The SDK sends it to the embedded app in a postMessage when the app loads.

Parameters on the iframe URL

The full configuration.

Only the parameters in Parameters that stay on the URL.

URL length

Grows with the configuration and can reach browser or proxy limits.

Stays short.

Configuration visible in the iframe URL, browser tools, and proxy logs

Yes.

Only the startup parameters.

Flags in additionalFlags

Appended to the URL.

Flags that are not startup parameters are sent in the postMessage.

First render

The app reads the configuration from the URL.

The app receives the configuration before it renders, so the first load does not flash the default layout.

Parameters that stay on the URLπŸ”—

When the flag is on, the SDK keeps the following parameters on the iframe URL, if they apply to your embed.

Embed and hostπŸ”—

URL parameterPurpose

embedApp

Marks the app as embedded.

hostAppUrl

The host page URL. The app uses it to validate the origin of the postMessage.

sdkVersion

The SDK version.

isFullAppEmbed

Marks an AppEmbed.

isLiveboardEmbed

Marks a LiveboardEmbed.

isVizEmbed

Set when a Liveboard embed shows a single visualization (vizId).

isSearchEmbed

Marks a SearchEmbed or SearchBarEmbed.

isSpotterExperienceEnabled

Marks a SpotterEmbed.

isSpotterAgentEmbed

Marks a SpotterAgentEmbed.

Authentication and OrgπŸ”—

URL parameterPurpose

authType

The authentication type that you set in init().

autoLogin

Whether the app signs the user in automatically.

disableLoginRedirect

Stops the app from redirecting to its login page.

forceSAMLAutoRedirect

Forces the SAML redirect for embedded SSO.

cookieless

Set for cookieless trusted authentication.

preAuthCache

Lets the app use pre-fetched authentication information.

blockNonEmbedFullAppAccess

Blocks access to the full app outside the embed.

orgId

The Org to load. The authentication information depends on the Org.

Viewport and loggingπŸ”—

URL parameterPurpose

viewPortHeight

The height of the host window when the iframe loads.

viewPortWidth

The width of the host window when the iframe loads.

clientLogLevel

The client log level of the app.

overrideConsoleLogs

Lets the app override the native console.

additionalPendoKey

An extra tracking key.

Locale, formats, and appearanceπŸ”—

URL parameterPurpose

locale

The UI language.

numberFormatLocale

The locale for number formatting.

dateFormatLocale

The locale for date formatting.

currencyFormat

The currency format.

isDarkMode

Turns on dark mode.

radiantThemeEnabled

Turns on the theme that dark mode needs.

URL parameterPurpose

linkOverride

Lets the host override links in the app.

enableLinkOverridesV2

Turns on version 2 of the link overrides.

disableRedirectionLinksInNewTab

Stops links from opening in a new tab.

overrideHistoryState

Uses replaceState instead of pushState for app navigation.

isOnBeforeGetVizDataInterceptEnabled

Legacy flag for the onBeforeGetVizData API intercept.

Search and contentπŸ”—

URL parameterPurpose

dataSources

The data sources that search opens with.

useLastSelectedSources

Whether search opens with the last-selected data sources.

searchTokenString

The initial search query. To keep it off the URL, set excludeSearchTokenStringFromURL.

defaultQueryMode

The query mode that Spotter opens in.

forceTable

Shows search results as a table.

tag

The tag that filters the metadata lists in an AppEmbed.

overrideStringIDsUrl

The URL of the custom string IDs file.

iconSprite

The URL of the custom icon sprite.

exposeTranslationIDs

Exposes translation IDs in the app.

Behavior changesπŸ”—

  • The iframe URL no longer contains most embed configuration, such as action visibility and Liveboard display options. Scripts, proxies, or monitoring tools that read configuration from the iframe URL stop finding those values. Use the SDK embed configuration as your source for these values.

  • If you do not set the flag, the SDK continues to pass the configuration on the iframe URL.

Pre-rendered embedsπŸ”—

For a pre-rendered embed, the SDK sends the configuration when it creates the embed. When you show the pre-rendered embed, the SDK sends the current configuration again, so changes that you made in the meantime take effect.

Β© 2026 ThoughtSpot Inc. All Rights Reserved.