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

# Embed

> Embed the partner portal in your product with an allow-list and authenticated sessions, and set up CRM embeds for HubSpot and Salesforce in Introw.

**Open in Introw:** [Embed](https://app.introw.io/settings/developers/embed)

## How it works

Portal embed is configured on the Embed page under Developers, through a short setup. First you authorize
the domains allowed to load the portal in an iframe. Then you create an API key with the portal sessions
permission. Finally you use the provided code samples to create an authenticated session for a
logged-in user and render the portal in your product.

CRM embed is set up from your CRM integration: once HubSpot or Salesforce is connected, partner context
appears on the relevant records through the Introw CRM app, so partners and your team work on the record
rather than in a separate portal.

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart LR
  key["Domain and portal-session key"] --> embed["Embedded portal or CRM card"]
  embed --> partner["Authenticated partner"]
```

## Prerequisites

* Integrations permission to manage embed domains.
* Embedding the portal is a paid add-on and must be enabled on your plan.
* A connected CRM for CRM embeds.

## Settings & configuration

Portal embed is configured at [Embed](https://app.introw.io/settings/developers/embed); CRM embeds are
set up from [Integrations](https://app.introw.io/settings/integrations).

### Allowed domains

In the embed setup, **Allow your domains to embed Introw** is where you list the domains permitted to
load the portal in an iframe. Add each domain where your product runs; the portal only loads inside these.

### Portal session key

The setup links you to create an API key with the portal sessions permission. This key is used by your
backend to create an authenticated session so a user opens directly into the portal.

### Integration code

The setup provides code samples for common frameworks, including Next.js, React, and plain JavaScript,
showing how to create a session and render the iframe. Copy the sample that matches your stack.

### CRM embeds

With HubSpot or Salesforce connected, Introw surfaces partner context on the record through its CRM app.
Set up and configure the connection from your CRM integration; partners then engage from the CRM.

## Setup walkthrough

<Steps>
  <Step title="Open Embed">
    Go to [Embed](https://app.introw.io/settings/developers/embed).
  </Step>

  <Step title="Allow your domains">
    Add the domains where your product will embed the portal.
  </Step>

  <Step title="Create a portal session key">
    Create an API key with the portal sessions permission.
  </Step>

  <Step title="Integrate the code">
    Use the provided code sample to create a session and render the portal.
  </Step>
</Steps>

## How-to guides

<CardGroup cols={2}>
  <Card title="Embed Introw in your CRM" icon="book-open" href="/features/developer/embed/guides/embed-introw-in-your-crm">
    Meet partners inside HubSpot and Salesforce - this lives in the CRM embed feature, which is the canonical home for setup.
  </Card>

  <Card title="Embed the partner portal" icon="book-open" href="/features/developer/embed/guides/embed-the-partner-portal">
    Authorize a domain, create a portal-session key, and render the authenticated partner portal inside your own product.
  </Card>
</CardGroup>

## Limits & gotchas

<Warning>
  Embedding the portal is a paid add-on and must be enabled on your plan. The portal only loads inside the domains you have authorized, so add every domain your product uses. Authenticated sessions are created server-side with a portal sessions key; never expose that key in the browser.
</Warning>

## Troubleshooting

* **The portal will not load in the iframe** - confirm the embedding domain is on the allow-list.
* **Users see a login screen instead of the portal** - your backend must create an authenticated session for them.
* **CRM context is missing on the record** - confirm the CRM integration is connected and configured.

## API reference

<CardGroup cols={2}>
  <Card title="Embed overview" icon="window-maximize" href="/general/embed-overview">
    The session endpoint and iframe pattern.
  </Card>

  <Card title="API reference" icon="code" href="/general/introduction">
    Endpoints and code.
  </Card>
</CardGroup>
