getInitConfig() : EmbedConfig
Gets the embed configuration settings that were used to initialize the SDK.
Returns
Version : SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
// Call the getInitConfig method to retrieve the embed configuration
const config = getInitConfig();
// Log the configuration settings
console.log(config);
Returns the EmbedConfig object, which contains the configuration settings used to initialize the SDK, including the following:
-
thoughtSpotHost
- ThoughtSpot host URL -
authType
: The authentication method used. For example,AuthServerCookieless
forAuthType.TrustedAuthTokenCookieless
-
customizations
- Style, text, and icon customization settings that were applied during the SDK initialization.
The following JSON output shows the embed configuration settings returned from the code in the previous example:
{
"thoughtSpotHost": "https://{ThoughtSpot-Host}",
"authType": "AuthServerCookieless",
"customizations": {
"style": {
"customCSS": {
"variables": {
"--ts-var-button--secondary-background": "#7492d5",
"--ts-var-button--secondary--hovers-background": "#aac2f8",
"--ts-var-root-background": "#f1f4f8"
}
}
}
},
"loginFailedMessage": "Login failed, please try again",
"authTriggerText": "Authorize",
"disableTokenVerification": true,
"authTriggerContainer": "#your-own-div"
}
Defined in : embed/embedConfig.ts