---
title: "Open Flume signed in"
description: "Create a one-time deep link with POST /deep-links when your user clicks, then open it. The Flume app opens signed in, on their search, product or quote."
url: https://docs.tryflume.ai/guides/open-flume-signed-in
updated: 2026-11-11
---

# Open Flume signed in

> Create a one-time deep link with POST /deep-links when your user clicks, then open it. The Flume app opens signed in, on their search, product or quote.

`POST /deep-links` returns a one-time URL that opens the Flume app with the user signed in. Create it on the click, and open it at once.

## Before you begin

- A `search_session_uuid` that belongs to the user.
- A click from the user. Do not create links ahead of time.

## 1. Create the link on click

**curl**

```sh
curl -X POST "https://sandbox-api.tryflume.ai/partner/v1/deep-links" \
  -H "X-Flume-Partner-Key: $FLUME_PARTNER_KEY" \
  -H "X-Flume-User-Token: $FLUME_USER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "search_session_uuid": "5f0c1d2e-8a7b-4c3d-9e1f-2a3b4c5d6e7f",
  "sku_uuid": "7f3c2a91-4b0e-4c8d-9a21-1f6b2d5e7c30"
}'
```

**Python**

```python
import os

import requests

headers = {
    "X-Flume-Partner-Key": os.environ["FLUME_PARTNER_KEY"],
    "X-Flume-User-Token": os.environ["FLUME_USER_TOKEN"],
}

response = requests.post(
    "https://sandbox-api.tryflume.ai/partner/v1/deep-links",
    headers=headers,
    json={
        "search_session_uuid": "5f0c1d2e-8a7b-4c3d-9e1f-2a3b4c5d6e7f",
        "sku_uuid": "7f3c2a91-4b0e-4c8d-9a21-1f6b2d5e7c30",
    },
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

**Node.js**

```js
const response = await fetch("https://sandbox-api.tryflume.ai/partner/v1/deep-links", {
  method: "POST",
  headers: {
    "X-Flume-Partner-Key": process.env.FLUME_PARTNER_KEY,
    "X-Flume-User-Token": process.env.FLUME_USER_TOKEN,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "search_session_uuid": "5f0c1d2e-8a7b-4c3d-9e1f-2a3b4c5d6e7f",
    "sku_uuid": "7f3c2a91-4b0e-4c8d-9a21-1f6b2d5e7c30"
  }),
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
console.log(await response.json());
```

**Response (201)**

```json
{
  "url": "https://app.tryflume.ai/?utm_source=acme&utm_medium=partner#/l/dlk_q3Vh8yT…",
  "expires_at": "2026-10-23T09:14:22Z"
}
```

| To open | Send |
|---|---|
| The search results | `search_session_uuid` |
| A product | `search_session_uuid`, `sku_uuid` |
| An instant quote | `search_session_uuid`, `sku_uuid`, `quote_uuid` |

## 2. Open it

Open `url` in a new tab, in the same click.

```js
button.addEventListener("click", async () => {
  const tab = window.open("", "_blank");
  if (tab) tab.opener = null; // the Flume app must not reach back into your page
  try {
    const { url } = await createDeepLinkOnYourBackend();
    if (url) tab.location = url;
    else tab.close();
  } catch {
    tab?.close();
  }
});
```

`createDeepLinkOnYourBackend` is your own function. Opening the tab first keeps the browser's pop-up blocker from stopping it.

## Rules

- The link works once, within 7 days.
- Never store, log or email `url`. It signs the user in.
- Do not parse or rebuild `url`.
- For a link you can store, use `product_url` from the [save payload](https://docs.tryflume.ai/concepts/save-payload.md).

## Send the user back to you

Add `redirect_uri` to return the user to your page afterwards.

- It must be an `https` URL.
- Its host must be a redirect host agreed with Flume.
- Otherwise the call is a `422` `VALIDATION_FAILED` naming `redirect_uri`.

## Handle the errors

| You get | Do this |
|---|---|
| `404` `SESSION_NOT_FOUND` | Use one of this user's searches |
| `404` `NOT_FOUND` | Check `sku_uuid`, and that `quote_uuid` is one of this user's quotes |
| `422` `SKU_NOT_IN_SEARCH` | Use the search that returned the product |
| `422` `QUOTE_NOT_READY` | Wait until the quote is `READY` |
| `422` `VALIDATION_FAILED` | Fix the field named in `error.field`. A quote for another product is refused this way |
| `429` `RATE_LIMITED` | Wait `Retry-After` seconds |
| `url` is `null` | You replayed an `Idempotency-Key`. Call again with a new key |

## See also

- [Deep links](https://docs.tryflume.ai/concepts/deep-links.md)
- [Create a deep link](https://docs.tryflume.ai/api/create-deep-link.md)
