---
title: "MetabaseConfig"
description: "Settings for defineMetabaseConfig()."
url: "https://www.metabase.com/docs/latest/embedding/eajs/snippets/MetabaseConfig"
version: "65"
---

> For the complete documentation index, see [llms.txt](https://www.metabase.com/docs/llms.txt).

Settings for `defineMetabaseConfig()`.

Page-level configuration shared by every web component on the page.

## Properties

<!-- [<snippet properties>] -->

| Property                                                               | Type                                                                                                                            | Description                                                                                                                                                                                                                                                                                                                                 |
| :--------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <a id="allowedcustomvisualizations"></a> `allowedCustomVisualizations` | `` `custom:${string}` ``[]                                                                                                      | The custom visualizations that components on the page can load, each prefixed with `custom:`, like `["custom:Calendar Heatmap"]`. Not available in guest embeds. See [Custom visualizations in embeds](https://www.metabase.com/docs/latest/embedding/custom-visualizations.md).<br>---<br>Optional                                            |
| <a id="apikey"></a> `apiKey`                                           | `string`                                                                                                                        | Development only. An API key from your Metabase, which embeds use to render on localhost. See [Preview embeds during development](https://www.metabase.com/docs/latest/embedding/config.md#preview-embeds-during-development).<br>---<br>Optional                                                                                              |
| <a id="fetchrequesttoken"></a> `fetchRequestToken`                     | () => [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `jwt`: `string`; \}\> | SSO embeds with JWT only. A function that fetches the JWT for embeds. See [Customizing JWT authentication](https://www.metabase.com/docs/latest/embedding/authentication.md#customizing-jwt-authentication).<br>---<br>Optional                                                                                                                |
| <a id="guestembedprovideruri"></a> `guestEmbedProviderUri`             | `string`                                                                                                                        | Guest embeds only. Your app's endpoint that signs guest tokens. The embed calls this endpoint for a token on load, and again when the current token expires. The endpoint should return `{ jwt: string }`. See [Configure a guest embed](https://www.metabase.com/docs/latest/embedding/config.md#configure-a-guest-embed).<br>---<br>Optional |
| <a id="instanceurl"></a> `instanceUrl`                                 | `string`                                                                                                                        | The URL of your Metabase, like `https://youlooknicetoday.metabaseapp.com`.                                                                                                                                                                                                                                                                  |
| <a id="isguest"></a> `isGuest`                                         | `boolean`                                                                                                                       | Whether the components authenticate as guest embeds, with a signed JWT instead of a Metabase session. See [Configure a guest embed](https://www.metabase.com/docs/latest/embedding/config.md#configure-a-guest-embed).<br>---<br>Optional<br>Default: `false`                                                                                  |
| <a id="jwtprovideruri"></a> `jwtProviderUri`                           | `string`                                                                                                                        | SSO embeds with JWT only. The URL of your JWT provider. When set, embeds use JWT and skip the request that discovers the SSO method.<br>---<br>Optional                                                                                                                                                                                     |
| <a id="locale"></a> `locale`                                           | `string`                                                                                                                        | The display language for every embed, as an ISO language code like `en` or `de`. Defaults to your Metabase instance's locale. See [Set the language](https://www.metabase.com/docs/latest/embedding/config.md#set-the-language).<br>---<br>Optional                                                                                            |
| <a id="pluginsconfig"></a> `pluginsConfig`                             | \{ `handleLink`: (`url`: `string`) => \{ `handled`: `boolean`; \}; \}                                                           | Plugins that customize component behavior. Web components support `handleLink`, for customizing what happens when people click a link. See [Web component plugins](https://www.metabase.com/docs/latest/embedding/config.md#web-component-plugins).<br>---<br>Optional                                                                         |
| `pluginsConfig.handleLink`                                             | (`url`: `string`) => \{ `handled`: `boolean`; \}                                                                                | Called when people click a link in an embed. Return `{ handled: true }` to handle the link yourself, or `{ handled: false }` to open the link in a new tab.<br>---<br>Optional                                                                                                                                                              |
| <a id="preferredauthmethod"></a> `preferredAuthMethod`                 | `string`                                                                                                                        | SSO embeds only. Which SSO method to use. If you've set up both SAML and JWT, embeds default to SAML. See [Authentication](https://www.metabase.com/docs/latest/embedding/authentication.md#if-both-saml-and-jwt-are-enabled-modular-embedding-will-default-to-saml).<br>---<br>Optional<br>Possible values: `"jwt"`, `"saml"`                 |
| <a id="theme"></a> `theme`                                             | `object`                                                                                                                        | Colors, fonts, and per-component appearance overrides. See [Appearance](https://www.metabase.com/docs/latest/embedding/appearance.md).<br>---<br>Optional                                                                                                                                                                                      |
| <a id="useexistingusersession"></a> `useExistingUserSession`           | `boolean`                                                                                                                       | Development only. Whether to render embeds with your own Metabase session. Only supported in Google Chrome. See [Preview embeds during development](https://www.metabase.com/docs/latest/embedding/config.md#preview-embeds-during-development).<br>---<br>Optional<br>Default: `false`                                                        |

<!-- [<endsnippet properties>] -->
