> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Protect a live link with a key, end date or rotation

> Add a key or an end date to a Mammoth Live Link, rotate it to a new URL, turn it off, see who fetched it and fix refused fetches in Power BI or scripts.
>
> Applies to: Team and Pro. Roles: The full key is shown only to people who can edit the View. Where: Pipeline panel › Live link task › Edit

A Live Link's settings control who can fetch it, until when, and at which URL. Open the Live link task with **Edit** in the pipeline panel; changes take effect at once. To create a link first, see [Live links](https://mammoth.io/docs/learn/share-and-export/live-links/).



| Section | What it shows or does |
| --- | --- |
| **Link** | The URL, with **Copy** |
| **Who can open it** | **Anyone with the link** or **Link + key** |
| **Stops working** | **Never** or **On a date** |
| **Use** | When the link was last fetched, by which tool, and how many fetches in the last 7 days |
| **Manage** | **Rotate link** and **Turn off** (or **Turn on**) |

## Protect a live link with a key

A new Live Link starts as **Anyone with the link**. For data only some people should fetch, switch to **Link + key** and share the key separately.

| Option | What it does |
| --- | --- |
| **Anyone with the link** | Anyone who has the URL can fetch the data. "Works in Power BI, Excel, Google Sheets, browsers." |
| **Link + key** | A fetch must also send the key. "Works in Power BI, Excel, scripts. Not Google Sheets: it can't send a key." |

With **Link + key**, the **Key** line shows the start and last 4 characters of the key. The full key is shown only to people who can edit the View.

- **Copy** copies the full key ("Key copied").
- **New key** makes a new key. The dialog warns: "The current key stops working at once. Anything using it needs the new key."
- **Copy link with key** copies a URL with the key inside, "For Mammoth's From URL import and scripts".

### Send the key from a script

Send the key as the password of Basic authentication, or in an `X-Mammoth-Key` header. A successful fetch answers with a redirect to a short-lived address of the file, so follow redirects (`-L` for curl):

```bash
curl -L -H "X-Mammoth-Key: $LIVE_LINK_KEY" "<live_link_url>" -o latest.csv
```

### Add a key to an old public-file link

Live links created before Mammoth addresses existed are still a public file. The settings say "This link is still a public file. Adding a key or rotating gives it a Mammoth address." Choosing **Link + key** on one opens **Add a key to this link?**.

1. Choose how long the old address keeps working: **Stop now**, **24 hours** or **7 days** (selected).
2. Click **Add key**.

The link gets a new Mammoth address. The old file address keeps working, without a key, for the time you picked.

## Set an end date on a live link

| Option | What it does |
| --- | --- |
| **Never** | The link works until you turn it off. This is the default |
| **On a date** | Pick a date from today onwards. The link works through the end of that day, in your own time zone, then refuses every fetch |

After the end date, the settings say "This link has ended. Every fetch is refused." Choose **Never** to make it work again. Use an end date for a link that is only needed for a while.

## See who fetched a live link

The **Use** line reads, for example, "Last fetched 2 hours ago by Power BI · 37 fetches in 7 days · 3 refused", or "Not fetched yet" before the first fetch.

Mammoth names the tool from the request: **Power BI**, **Power Query**, **Google Sheets**, **Script** (curl or Python requests), **Browser** or **Other**. A fetch is refused when it has the wrong key or none, comes after the end date or while the link is off, or comes before the link has any data.

## Rotate a live link to a new URL

**Rotate link** gives the link a new URL, and a new key for a key link. Anything using the old URL has to be updated.

1. Click **Rotate link**. The **Rotate this link?** dialog opens.
2. Under **Old link keeps working for**, choose **Stop now**, **24 hours** (selected) or **7 days**.
3. Click **Rotate link**.

If the link has been fetched, the dialog reminds you, for example: "Last fetched 2 hours ago by Power BI. Update that report before the old link stops." While the old URL still works, the settings show when it stops.

## Turn a live link off and on

**Turn off** makes the URL refuse every fetch. Settings and key are kept, so **Turn on** makes the same URL work again. While off, the settings say "Turned off. Every fetch is refused until you turn it back on."

## Fix a refused live link fetch

A Mammoth address sends one of these plain-text messages instead of the data; BI tools show it as the error.

| Message | Status | Cause | Fix |
| --- | --- | --- | --- |
| "Wrong or missing key for this live link." | 401 | The link needs a key and the request sent none, or an old one | Copy the key again, or use **Copy link with key**. After **New key**, update every tool that uses the link |
| "This live link has ended." | 410 | The end date has passed | Choose **Never** under **Stops working**, or a later date |
| "This live link is turned off. Ask the person who shared it to turn it back on." | 410 | Someone clicked **Turn off** | Click **Turn on** |
| "This live link has no data yet. It fills the next time its view runs." | 409 | The task hasn't finished its first run | Wait for it, or run the pipeline |
| "No live link at this address." | 404 | The address is mistyped, or it was rotated and the old address has stopped | Copy the current link from the settings |

If none of these appears, check the Monitor's **Needs Attention** tab for an error on the Live link task.

If the settings don't open ("The link settings could not be loaded.") or a change fails ("The link could not be changed. Try again."), close the form, open the task with **Edit** again and retry.

## Related

- [Live links](https://mammoth.io/docs/learn/share-and-export/live-links/): create a link and connect Power BI or Excel.
- [Manage a live link over the API](https://mammoth.io/docs/learn/share-and-export/live-link-api/): the same settings as API routes.
- [Import from a URL](https://mammoth.io/docs/learn/get-data-in/import-from-a-url/): read a key link back into Mammoth.
- [Hold exports for review](https://mammoth.io/docs/learn/share-and-export/hold-exports-for-review/): the Monitor panel.

---
Source: https://mammoth.io/docs/learn/share-and-export/secure-a-live-link.md · Updated: 2026-11-08
