# Quickstart: your first embedded screen (/docs/embed/quickstart)

Before building anything, see it work with your own account: one key, one call, one HTML file. You need a Happierleads account with at least one website.

<Steps>
<Step>

### Switch embedding on for localhost [#switch-embedding-on-for-localhost]

In the dashboard open **Account settings → White label → Embed in your app**:

1. Tick **Allow my app to embed these screens**.
2. Under **Your app's addresses** add `http://localhost:8000` and click **Save addresses**.
3. Under **Server keys** click **Create key** and copy it (it is shown once).

You don't need your own domain yet: [Your domain and keys](/docs/embed/setup) does that before you go live.

</Step>
<Step>

### Find a website id [#find-a-website-id]

Switch the playground to **My real account** and press **Send request**: copy the `_id` of one of your websites. (On Mock data you get the sample website.)

<ApiPlayground method="get" path="/admin/websites" tool="list_websites" args={`{}`} />

</Step>
<Step>

### Ask for a one-time link [#ask-for-a-one-time-link]

From your terminal, with the key from step 1 and the website id from step 2:

```bash
curl -X POST "https://rest-admin.happierleads.com/v3/embed/sessions" \
  -H "Authorization: Bearer hle_YOUR_EMBED_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "websiteId": "YOUR_WEBSITE_ID", "view": "auto" }'
```

You get `{ "url": "…/embed?ticket=…" }`. It works **once, within 60 seconds**, so go straight to the next step.

</Step>
<Step>

### Open it in a page [#open-it-in-a-page]

Save this as `index.html`, paste the `url` in, and serve the folder on port 8000 (`python3 -m http.server 8000`), then open `http://localhost:8000`:

```html title="index.html"
<iframe src="PASTE_THE_URL_HERE" title="Website visitors" style="width:100%;height:100vh;border:0"></iframe>
```

Your website's leads (or its install screen, if the pixel isn't live yet) appear inside your page. Reload after 60 seconds and you get *This link was already used or has expired*: that is the one-time link doing its job.

</Step>
</Steps>

## What you just did [#what-you-just-did]

| You did by hand | In the real integration |
| --- | --- |
| Copied a website id | Your server creates one website per client at sign-up and saves its id ([create a website](/docs/embed/create-website)) |
| Ran `curl` with the embed key | One endpoint on your server asks for the link on every page load ([open a screen](/docs/embed/open-a-screen)) |
| Pasted the url into `index.html` | Your page fetches the url from your endpoint and sets the iframe ([show it in an iframe](/docs/embed/iframe)) |
| Used `localhost` | Your app's real address, with the screens on your own domain ([your domain and keys](/docs/embed/setup)) |

**Next:** [how it works: the three flows](/docs/embed/how-it-works).
