> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meetsilicon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up embedding

> Generate expirable URLs and tokens to serve Silicon content to users in your own application

> [!NOTE]
>
> Embedding is available for Silicon customers where Silicon has enabled it. [Get in touch](https://silicon.typeform.com/to/BujU5wg5) to ask about enabling it for your account.

> [!TIP]
>
> **Try it and see the code.** [embed.meetsilicon.com](https://embed.meetsilicon.com) is an interactive demo and helper that lets you preview embedded content and generate a JWT for your own project. For a working end-to-end example, see the [example embed app on GitHub](https://github.com/meetsilicon/example-embed-dashboard-with-nodejs-app) -- a Node.js app that mints tokens server-side and renders a Silicon dashboard.

## What can you embed?

Silicon supports embedding several types of content, each designed for different use cases:

### Dashboards

Embed complete dashboards with multiple visualizations, filters, and tabs. Perfect for providing comprehensive analytics views in your application.

**Use cases:**

* Executive dashboards in admin panels
* Customer-facing analytics portals
* Embedded reporting for SaaS applications

[Learn more about embedding dashboards ->](https://docs.meetsilicon.com/embed/embed-dashboards.md)

### Charts

Embed individual saved charts for focused, single-metric displays. Charts provide a minimal UI for clean integration.

**Use cases:**

* Single KPI widgets in applications
* Embedded metrics in marketing pages
* Focused analytics in workflows

> [!NOTE]
>
> Chart embedding requires the React SDK. iframe embedding is only available for dashboards.

[Learn more about embedding charts ->](https://docs.meetsilicon.com/embed/embed-charts.md)

### AI agents

Embed a Silicon AI agent so customers can chat with their data and generate charts without leaving your product. Each embed is scoped to a single agent and space.

**Use cases:**

* "Chat with your data" experiences inside customer-facing apps
* Self-serve analytics where customers can ask ad-hoc questions
* Scoped AI access where each customer can only see their own content

> [!NOTE]
>
> AI agent embedding requires the React SDK. iframe embedding is not supported for AI agents.

[Learn more about embedding AI agents ->](https://docs.meetsilicon.com/embed/embed-ai-agents.md)

### Metrics catalog

Embed the project's metrics catalog so users can browse the metrics and dimensions in your semantic layer, preview them, and -- if you allow it -- jump into Explore from any metric. Great for surfacing "what can I measure?" inside your product without exposing a full Silicon workspace.

**Use cases:**

* A self-serve metric browser inside a customer-facing app
* A discovery surface next to your own charts so users can find related metrics
* Guided exploration where users start from a metric and continue into Explore

> [!NOTE]
>
> Metrics catalog embedding requires the React SDK. iframe embedding is not supported for the metrics catalog.

[Learn more about embedding the metrics catalog ->](https://docs.meetsilicon.com/embed/embed-metrics-catalog.md)

### Data apps

Embed a [data app](https://docs.meetsilicon.com/data-apps) as standalone content in an iframe -- the full app, no dashboard or surrounding chrome. Useful when you want to surface an entire AI-generated app as a feature in your product.

**Use cases:**

* Customer-facing interactive reports
* Embedded narratives or slide-show apps in your product
* Self-serve analytics views built on your semantic layer

[Learn more about embedding data apps ->](https://docs.meetsilicon.com/embed/embed-data-apps.md)

## How can you share or embed content?

Silicon offers three ways to share embedded content. The choice depends on whether you need to embed content in your own application or simply share a link.

**Shareable URL** is the simplest option. Silicon can generate a standalone URL that anyone can open directly in their browser -- no iframe, no SDK, and no Silicon account required. This is useful when you want to share a dashboard with users outside your organisation (e.g., clients, partners, or stakeholders) without embedding it in an application. The URL uses the same JWT-based security as the other methods, so it expires after the time you set and can include user attributes for row-level filtering.

**[iframe embedding](https://docs.meetsilicon.com/embed/iframe.md)** lets you embed a dashboard inside your own web page. You generate a JWT, construct a URL, and add it to an `<iframe>` tag. There are no additional setup requirements and this works anywhere (React, Vue, plain HTML). Note that iframe embedding currently only supports dashboards (chart embedding via iframe is not supported).

**[React SDK](https://docs.meetsilicon.com/embed/react-sdk.md)** (`@meetsilicon/sdk`) is the most powerful option. It supports both dashboards and charts, lets you pass filters programmatically, hook into user interaction callbacks (like when someone navigates to Explore), and apply custom styling to match your app. It requires a React/Next.js app and CORS configuration on the Silicon instance (Cloud customers need to contact Silicon to set that up).

All three methods use the same JWT-based authentication and security model.

### Quick comparison

| Feature | Shareable URL | iframe | React SDK |
| - | - | - | - |
| Dashboards | ✓ | ✓ | ✓ |
| Individual charts | ✗ | ✗ | ✓ |
| AI agents | ✗ | ✗ | ✓ |
| Metrics catalog | ✗ | ✗ | ✓ |
| Data apps (standalone) | ✓ | ✓ | ✗ |
| Requires embedding in an app | No | Yes | Yes |
| Setup complexity | Low | Low | Medium |
| CORS needed | No | No | Yes |
| Programmatic filters | Via JWT config | Via JWT config | Via SDK `filters` prop |
| Custom styling | No | Limited | Full control |
| Framework requirement | None | None | React / Next.js |

### Passing filters to embedded dashboards

Both methods support filters, just differently:

* **JWT config** -- Set filters in the token payload at embed time. Works for both methods.
* **React SDK `filters` prop** -- Pass them dynamically at runtime. Better if filters need to change based on the logged-in user.

## CORS

CORS controls which browser origins can call the Silicon API. You only need to configure it when your embedded application calls Silicon from the browser -- that is, when using the [React SDK](https://docs.meetsilicon.com/embed/react-sdk.md). Shareable URLs and iframe embeds do not need CORS. See [Set up CORS](https://docs.meetsilicon.com/embed/react-sdk.md#set-up-cors) for how to add your origins.

## Quick start: Embed a dashboard

This quick start will walk you through embedding your first dashboard using an iframe.

### Step 1: Create an embed secret

First, you need to generate a secret per project. This secret is like a password that will help you encrypt the URLs so we know the access is valid.

You can regenerate the secret by clicking on the `Generate new secret` button. If you do this, people with an old URL will automatically lose access to any previously shared embed URL.

### Step 2: Add allowed dashboards

Only selected dashboards can be accessed via embed URLs. Add the dashboard you want to embed to the allowed list.

### Step 3: Configure and preview

Under the "Configure" section, you can:

* Select which dashboard to embed
* Set token expiration time
* Configure interactivity (filters, exports, etc.)
* Add user attributes for row-level security

Click on `Preview` to see how the embedded content will look, and click on `Generate & copy URL` to get a one-off embed URL for testing.

> [!TIP]
>
> The generated URL can be shared directly with anyone -- they can open it in their browser without needing a Silicon account or any embedding setup. This is a quick way to share a dashboard with people outside your organisation (e.g., clients or partners) without building an iframe or React integration.

### Step 4: Generate tokens programmatically

Although you can generate URLs directly from Silicon with a long expiration, it is recommended to generate your own JWTs in your backend with a short expiration using your `secret` to make sure people can't be using embed URLs outside your app.

Silicon provides code snippets you can copy and use in your app to generate valid embed URLs, and the [embedding reference](https://docs.meetsilicon.com/embed/reference.md) documents the full JWT structure:

## Common questions

### Do I need a Silicon account to view embedded content?

No, embedded Silicon content is available to view by anyone (not just folks with a Silicon login).

So, for example, you could embed a dashboard in your product, and anyone who has access to your product would have access to that dashboard. No need to login to Silicon. You can also share a dashboard URL directly with someone outside your organisation -- they just open the link in their browser.

We make sure that the links are secure and have a set expiry time that you pick.

### How does security work?

Embedded content is secured using JWT (JSON Web Tokens) that you sign with your embed secret. The token includes:

* What content to display (dashboard or chart)
* Expiration time
* User attributes for row-level filtering
* Permissions for interactivity (filters, exports, etc.)

Tokens are short-lived and should be generated server-side to prevent exposure of your embed secret.

### Can I show different data to different users?

Yes! You can use [user attributes](https://docs.meetsilicon.com/workspace-admin/user-attributes.md) to implement row-level security in your embedded content. This allows you to filter data based on the viewing user's properties (e.g., tenant ID, region, etc.).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.