---

title: Account sharing and multi-accounting
description: Count the browsers behind each account and the accounts behind each browser with linked ids, the related reads and the account webhooks, and set limits that honest customers never hit.
---

## The threat

Two problems, mirror images of each other:

- **Account sharing.** One paid login is passed round friends, posted in a forum or resold. Every extra person on it is a subscription you do not sell. The tell is one account on more browsers, in more places, than one person or one household uses.
- **Multi-accounting.** One person runs many accounts: to vote ten times, claim ten bonuses, trade with themselves, dodge per-account limits or come back after a ban. The tell is one browser carrying many accounts.

Both come down to the same two counts: **browsers per account** and **accounts per browser**. knownprint gives you both once you send your account id with each visit. The account id is a **linked id**: a string of your own (up to 128 characters) that you attach to events. knownprint then keeps which browsers (visitor ids) carried which accounts, answers both questions through the related reads, and tells you by webhook when a browser carries an account for the first time.

## Where to identify

| Moment                                                                                       | Why                                                                             |
| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Sign-in                                                                                      | The moment an account arrives on a browser. The main check for sharing          |
| Session refresh or app start on an already signed-in browser                                 | Catches long sessions handed over without a new sign-in                         |
| Signup                                                                                       | The main check for multi-accounting: how many accounts this browser already has |
| The action your rules limit per account (a vote, a bonus, a trade, a review, a stream start) | Where multi-accounting pays off for the abuser                                  |

In the page, call `identify()` before the request and send the request id with it ([Add the browser agent](/install/browser), [protect a form](/install/forms)). In your backend, once you know which account is signed in, attach it to the event:

```bash
curl -X PATCH "$KNOWNPRINT_API/v1/events/$REQUEST_ID" \
  -H "Authorization: Bearer $KNOWNPRINT_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"linked_id": "acct_8841"}'
```

The answer is the updated event. Set the linked id from your backend, not with the `linkedId` option of `identify()`: the page is under the user's control, your session is not. `linked_id` is 1 to 128 characters; `null` clears it. [Accounts and linked ids](/accounts) covers the rules, and [Events API](/api/events) the route.

:::tip Use an id that never changes
Use your internal account id, not an email address or a username. It keeps personal data out of knownprint, and it survives a user changing their email.
:::

## Which fields and routes to use

### Browsers per account

| Route or field                                      | Answers                                                                                                                                                                       |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /v1/linked/{linked_id}/related`                | `visitors`: the browsers that carried this account id. `linked_ids`: your other accounts seen on those browsers                                                               |
| `GET /v1/events?linked_id={linked_id}&start={time}` | Every event of the account since `start`, newest first, with each event's `visitor_id`, `network.country` and signals. Use it to count browsers over a window                 |
| `account.linked` webhook                            | A browser carried this account for the first time: `data.visitor_id` and `data.linked_id`                                                                                     |
| `account.related_found` webhook                     | Sent beside `account.linked` when the account now has more than one browser, or the browser more than one account: `data.visitors` and `data.linked_ids` are those two counts |

### Accounts per browser

| Route or field                                  | Answers                                                                                                                        |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `GET /v1/visitors/{visitor_id}/related`         | `linked_ids`: the account ids this browser carried. `visitors`: other visitors related to this browser, each with its evidence |
| `linked_ids` on `GET /v1/visitors/{visitor_id}` | The distinct linked ids on the visitor's events, up to 100. It shrinks as old events are deleted                               |

:::note Coming
Device clusters, which group different browsers on one device so that two browsers of one laptop count once, are coming. Events carry `device_cluster_id` and `cluster_confidence` today, but both are null, so count browsers for now and set your limits with that in mind. See [Device clusters](/visitors#device-clusters).
:::

Each related list is ordered strongest first and holds at most 50 entries. For an account past 50 browsers the list is not the most recent 50: count with `GET /v1/events` instead. Each entry's `evidence` is a list of `{ kind, detail, weight }`; evidence of kind `linked_id` means a shared account id. The [Linked ids API](/api/linked) and the [visitor related read](/api/visitors#get-v1-visitors-visitor-id-related) document both reads and every evidence kind.

### Context on each visit

| Field                          | Use it for                                                                                                                                                     |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `confidence`                   | How sure knownprint is about `visitor_id`, from 0 to 1. When it is low, the id may not be the browser's lasting id: do not count it against a limit on its own |
| `network.country`              | The country of the visit's address, or null. Several countries at once on one account points at sharing                                                        |
| `signals.vpn`, `signals.proxy` | A VPN or a proxy explains a country that jumps; do not count it as a second place                                                                              |
| `signals.suspect_score`        | 0 to 100. Raises the priority of a review ([Suspect score](/signals/suspect-score))                                                                            |

## Decision tables

Account sharing, at sign-in. "Browsers" means distinct visitor ids, each resolved to its surviving id, seen on the account within a window you choose (30 days is a common start). These are starting points, not knownprint defaults.

| What you see                                                                                      | Suggested action                                                                         |
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| The browser (or an alias of it) already used this account                                         | Allow                                                                                    |
| A new browser, browsers in the window within the plan's limit                                     | Allow, and tell the owner a new browser signed in                                        |
| A new browser, browsers over the plan's limit                                                     | Ask the owner to confirm, or to sign out another browser                                 |
| A new browser, browsers well over the limit (for example twice it)                                | Refuse the sign-in and require a password reset                                          |
| The account active from two or more countries within the last hour, VPN and proxy visits left out | Flag for review; a candidate for a forced sign-out                                       |
| A new browser with `confidence` below 0.5                                                         | Allow and tell the owner rather than ask for confirmation or refuse: the id is uncertain |

Multi-accounting, at signup or at a limited action:

| What you see                                                                                                 | Suggested action                                                                  |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------- |
| The browser carries one account                                                                              | Allow                                                                             |
| Two or three accounts                                                                                        | Allow. Households and shared computers do this honestly                           |
| More accounts than your rules allow per person, created recently                                             | Review, or refuse the limited action (the vote, the bonus) for the extra accounts |
| One of the browser's accounts is banned                                                                      | Follow [Keep banned users out](/guides/ban-evasion)                               |
| `visitors` in the related read lists other browsers with `linked_id` evidence, and those carry more accounts | A ring of accounts shared over several browsers: review the whole group           |

## Backend example

A sign-in check in Node 22 that enforces a per-plan browser limit. It reads the account's events over the window, resolves merged ids, counts the browsers, and decides. The plan limits leave room for one person's phone, laptop and work computer. It assumes you already verified the event ([Verify a request in your backend](/install/server)).

```js title="sharing.js"
const API = process.env.KNOWNPRINT_API; // the API address that comes with your account
const SECRET = process.env.KNOWNPRINT_SECRET_KEY; // sk_live_..., scopes events:read and events:write
const DAY_MS = 86_400_000;
const HOUR_MS = 3_600_000;
const PLAN_BROWSERS = { basic: 2, standard: 4, premium: 8 };

async function kp(path, init = {}) {
  const res = await fetch(`${API}${path}`, {
    ...init,
    headers: {
      Authorization: `Bearer ${SECRET}`,
      Accept: 'application/json',
      ...(init.body ? { 'Content-Type': 'application/json' } : {}),
    },
  });
  // 404: no such visitor or linked id; 409: the visitor is being deleted.
  if (res.status === 404 || res.status === 409) return null;
  if (!res.ok) throw new Error(`knownprint ${res.status}`);
  return res.json();
}

/** Resolves visitor ids to their surviving id (merges make older ids aliases), cached per check. */
function resolver() {
  const cache = new Map();
  return async (visitorId) => {
    if (!cache.has(visitorId)) {
      const v = await kp(`/v1/visitors/${visitorId}`);
      cache.set(visitorId, v === null ? visitorId : v.visitor_id);
    }
    return cache.get(visitorId);
  };
}

/** The account's browsers over the window: surviving visitor id to the countries seen on it. */
async function browsersOf(accountId, days, canonicalOf) {
  const start = new Date(Date.now() - days * DAY_MS).toISOString();
  const browsers = new Map();
  let cursor = null;
  do {
    const q = new URLSearchParams({ linked_id: accountId, start, limit: '500' });
    if (cursor !== null) q.set('cursor', cursor);
    const page = await kp(`/v1/events?${q}`);
    for (const e of page?.data ?? []) {
      const id = await canonicalOf(e.visitor_id);
      const countries = browsers.get(id) ?? new Map(); // country to its latest time, in ms
      const hidden = e.signals.vpn?.value === true || e.signals.proxy?.value === true;
      if (e.network.country !== null && !hidden) {
        const at = Date.parse(e.created_at);
        countries.set(e.network.country, Math.max(countries.get(e.network.country) ?? 0, at));
      }
      browsers.set(id, countries);
    }
    cursor = page?.next_cursor ?? null;
  } while (cursor !== null);
  return browsers;
}

/** Countries seen on the account within the last hour, VPN and proxy visits left out. */
function countriesInLastHour(browsers) {
  const since = Date.now() - HOUR_MS;
  const seen = new Set();
  for (const countries of browsers.values()) {
    for (const [country, at] of countries) if (at >= since) seen.add(country);
  }
  return seen;
}

/**
 * Decide a sign-in. `event` is the verified event of the sign-in request, `account` your own
 * record with `id` and `plan`. Returns 'allow', 'allow_notify', 'confirm', 'refuse' or 'review'.
 */
export async function checkSignIn(event, account) {
  const canonicalOf = resolver();
  const here = await canonicalOf(event.visitor_id);

  // The browsers that carried the account before this sign-in.
  const related = await kp(`/v1/linked/${encodeURIComponent(account.id)}/related`);
  const before = await Promise.all((related?.visitors ?? []).map((v) => canonicalOf(v.visitor_id)));

  // Attach the account, so this sign-in is part of the counts below.
  await kp(`/v1/events/${event.request_id}`, {
    method: 'PATCH',
    body: JSON.stringify({ linked_id: String(account.id) }), // 1 to 128 characters
  });

  const browsers = await browsersOf(account.id, 30, canonicalOf);
  if (countriesInLastHour(browsers).size > 1) return 'review';
  if (before.length === 0 || before.includes(here)) return 'allow'; // first or known browser
  if (event.confidence < 0.5) return 'allow_notify'; // an uncertain id: never refuse on it

  const limit = PLAN_BROWSERS[account.plan] ?? 2;
  const count = browsers.size; // this browser included
  if (count <= limit) return 'allow_notify';
  if (count > 2 * limit) return 'refuse';
  return 'confirm';
}

/** Accounts per browser, for sign-up or a limited action. */
export async function accountsOnBrowser(event) {
  const related = await kp(`/v1/visitors/${event.visitor_id}/related`);
  return related === null ? [] : related.linked_ids.map((l) => l.linked_id);
}
```

`allow_notify` is where you email the owner ("A new browser signed in to your account"), which also lets a real owner spot a stranger. `confirm` is where you ask the owner to approve the new browser or sign one out.

A browser is new to the account when the related read did not list it before this sign-in, which is why the read comes before the `PATCH`; the account's very first browser is simply allowed. If you would rather keep your own table of each account's browsers, the `account.linked` webhook tells you of every new pair, and `visitor.merged` tells you when two of the ids are one browser ([Webhooks](/webhooks)).

:::note Coming
The Node SDK wraps these routes (the event update, the visitor read, and the related reads as `visitors.related` and `linked.related`) and is coming with the SDK release ([Node SDK](/sdks/node)).
:::

### Paging and cost

`GET /v1/events` returns 50 events per page by default and up to 500 with `limit`; follow `next_cursor` until it is null. An account with heavy traffic has many events over 30 days, so cache the browser count per account for a few minutes, or keep your own table fed by `account.linked`, rather than paging on every sign-in. The rate limits for each route are in [Rate limits](/limits).

## Using the webhooks

Subscribe to [`account.linked`](/webhooks#account-linked) and [`account.related_found`](/webhooks#account-related-found) ([Webhooks API](/api/webhooks)). `account.linked` is sent when a browser carries an account for the first time, whether the linked id came from `identify()` or from `PATCH /v1/events/{request_id}`; `account.related_found` is sent with it when that leaves the account with more than one browser or the browser with more than one account. A browser carrying an account it already carried sends neither.

```json
{
  "v": 1,
  "id": "dl_m3k7tq2xa4pfz3bnw6tqyh5rd2",
  "type": "account.related_found",
  "created_at": "2026-06-01T09:14:07.512Z",
  "environment_id": "env_r4tzm2qa7xk3bnw6pfy5hd2gqe",
  "visitor_id": "v_k7q2mxa4pfz3bnw6tqyh5rd2xa",
  "data": {
    "visitor_id": "v_k7q2mxa4pfz3bnw6tqyh5rd2xa",
    "linked_id": "acct_8841",
    "visitors": 3,
    "linked_ids": 1
  }
}
```

Here account `acct_8841` has just arrived on a browser and now has three browsers; the browser carries only this one account. A `linked_ids` count that keeps climbing on one browser is multi-accounting; a `visitors` count that keeps climbing on one account is sharing. Verify every delivery before you act on it ([Verify webhook signatures](/webhooks/verify)).

## Pitfalls

- **Counting browsers as people.** One person has a phone, a laptop and a work computer, and two browsers on the laptop. Count over a window, and set plan limits with room for an honest household.
- **Counting merged ids twice.** Browsers that lose their data may get a new visitor id that knownprint later merges into the old one. An event keeps the id it was answered with, so the same browser can appear under two ids in the search. Resolve each id with `GET /v1/visitors/{visitor_id}` and count canonical ids, as the example does.
- **Counting forever.** A browser used once last year is not a sharer today. Count over a window with `start` on `GET /v1/events`, rather than every browser the related read ever saw.
- **Treating a VPN as travel.** A VPN or a proxy moves the country of a visit without the person moving. Leave those visits out of the country check, as the example does.
- **Blocking a household.** Several accounts on one family computer, or one account used by a couple, is common and often within your terms. Refuse only what your terms forbid, and prefer asking the owner to confirm over refusing.
- **Letting the page name the account.** The `linkedId` option of `identify()` is set in the browser, where a user can change it. Attach the account from your backend once you know who signed in.
- **Putting personal data in the linked id.** An email or a name as the linked id puts personal data in every event. Use an opaque account id.
- **Hitting the caps.** The related lists hold at most 50 entries, and a visitor's `linked_ids` at most 100. An account or a browser at those caps is already far past any honest limit: treat reaching them as the answer.
- **Expecting the event history to last.** Events are kept for your account's event retention period and then deleted ([How long events are kept](/events#how-long-events-are-kept)), and a visitor's `linked_ids` comes from its events. The pairs of browser and account behind the related reads stay after those events are deleted, until the visitor or the linked id is deleted or you replace or clear that linked id on its event, so the related reads reach further back; count over a recent window anyway.
- **Keeping it secret from your users.** Tell users that you limit the browsers or devices on an account, and how they can sign others out. It turns a block into a prompt to upgrade, and it belongs in your privacy notice ([Privacy](/privacy)).

## Related pages

- [Accounts and linked ids](/accounts): attaching your account ids to events.
- [Linked ids API](/api/linked) and [Visitors API](/api/visitors): the related reads and the visitor read.
- [Webhooks](/webhooks): `account.linked`, `account.related_found` and the merge types.
- [Protect logins from account takeover](/guides/account-takeover): a new browser on an account can also be a thief.
- [Keep banned users out](/guides/ban-evasion) and [Stop promo, bonus, referral and trial abuse](/guides/promo-abuse).
