# Browser extension

> For AI agents: the index of these docs is at https://referalli.com/guides/llms.txt (every page it lists has a Markdown version like this one).

Get your tracked link, and what it earns, for any product page from your browser toolbar. Chrome and Firefox.

The Referalli for partners extension turns the page you are on into your tracked link. Open a product page, click the toolbar button, and it shows the program the page belongs to and what you earn on it. One click gives you your link to copy.

## Set it up

:::stepper
::step{title="Create an API token"}
In the portal, open **Account settings** and create a partner API token with the **read** and **write** scopes. Copy it: it is shown once.
::
::step{title="Install the extension"}
Install **Referalli for partners** from your browser's extension store, or load the unpacked `apps/extension/dist` folder in developer mode.
::
::step{title="Paste the token"}
Open the extension's **Options** page and paste the token. Leave the API base as `https://referalli.com` unless your programs run on a custom domain. The token stays in this browser only.
::
:::

## Use it

1. Go to a product page on a merchant's site.
2. Click the extension button. It shows **Get link · earns 12%** (your rate for that product).
3. Click it, then **Copy**. If you already had a link for the product, you get that one back; otherwise a new one is created.

If the page is in more than one of your programs, pick the program first. A page that is not in any program you are approved in says so and creates nothing.

## What it can do

- It uses only the `activeTab` and `storage` permissions, and runs no code from the network.
- It calls two API routes with your token as a bearer token and no cookies: `GET /v1/partner/links/match?url=` and `POST /v1/partner/links/product`. The token cannot change your profile, payouts or security settings.
- Revoke the token in the portal at any time to cut the extension off.

## For the maintainers

`pnpm --filter @referally/extension build` writes `apps/extension/dist` and `dist/referalli-extension.zip`. Publishing the zip to the Chrome Web Store and Firefox Add-ons takes the owner's developer accounts and is not automated. The API answers CORS for `chrome-extension://` and `moz-extension://` origins only on `/v1/partner/*` calls that carry an `rpt_` bearer token.

---

## For AI agents

- This page for a human reader: https://referalli.com/guides/browser-extension
- The whole space as one Markdown file: https://referalli.com/guides/llms-full.txt
- Live search + fetch over MCP: https://referalli.com/guides/_api/public/orgs/07f432f4-34b9-46a7-aaad-c0e395d2e4f9/spaces/2d18b3a7-6f85-4e83-b889-e1a361196ad4/mcp
  - Install (Claude CLI): `claude mcp add referalli --transport http https://referalli.com/guides/_api/public/orgs/07f432f4-34b9-46a7-aaad-c0e395d2e4f9/spaces/2d18b3a7-6f85-4e83-b889-e1a361196ad4/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
