# Static account PIN

> One 6 digit PIN the owner picks guards every folder of the account: the ones live now and every one an agent creates later. Visitors enter it once per browser, on top of the folder's unguessable URL.

HTML version: https://tmphost.io/docs/pins/static/ · All PIN strategies: https://tmphost.io/docs/pins.md

## Why a static PIN

It is the simplest second lock. The owner remembers one number, tells it to the people they share with, and from then on no folder of theirs opens from a leaked link alone, whichever agent made it and however it was shared. Nothing has to be set per folder, so an agent can't forget to protect one.

## Set it up

1. Sign in at https://app.tmphost.io/security.
2. Under **Account PIN**, pick **Static PIN**.
3. Type 6 digits and save.

The PIN is stored only as a bcrypt hash: tmphost.io can't show it again, and nobody reading the database learns it. Folder results now carry `"pinMode":"static"`.

The same setting through the API, with the account's token (see https://tmphost.io/docs/api.md):

```
$ curl -sS -X PUT -H "Authorization: Bearer $TOKEN" \
    -d '{"mode":"static","pin":"482913"}' $API/users/me/pin
{"mode":"static","agentPins":false}
```

The PIN here is an example. `GET /users/me/pin` returns the current mode, never the PIN. `{"mode":"off"}` turns it off again.

## Change it

Type a new PIN on the Security page and save; leave the field empty to keep the current one. A new PIN locks out everyone who entered the old one: their cookies name the old PIN and stop working at once. Change it when someone should no longer see new files, or when it may have leaked.

## What visitors see

The "Enter PIN" page, the first time they open any file of the folder in a browser. The right PIN lets them into that folder until it expires. A link with `?pin=` and the PIN appended skips the page, but carries the PIN with it, so don't paste such links where the plain URL wouldn't be safe either. Two wrong PINs in a minute, per folder and address, answer `429` until the minute is over. More in https://tmphost.io/docs/pins.md

## What agents see

The agent never learns the PIN. Its results say a PIN is needed:

```
$ tmphost file upload report.pdf
Uploading 1 files (cost: 3 credits)
https://k7q2m9xa.file.tmphost.io/report.pdf

id:      k7q2m9xa
url:     https://k7q2m9xa.file.tmphost.io/
expires: 2026-10-24 04:15 UTC (in 30m)
pin:     required (your account PIN)
```

Over MCP and the API the result has `"pinMode":"static"` and no `pin`. The agent hands over the URL and says it opens with the user's account PIN. `--pin`, `pin: true` and the `pin` action don't apply while the account PIN is on: the folder is already guarded, and a request for a folder PIN answers `409`.

## When to pick it

- **Good for:** an owner who shares with the same few people, and wants every folder guarded without thinking about it.
- **Watch out:** one PIN opens every folder. Someone told it once can open every later folder whose link reaches them, until the PIN changes.
- **Instead:** a PIN that is no use 90 seconds later: https://tmphost.io/docs/pins/authenticator.md. A different PIN for each folder: https://tmphost.io/docs/pins/folder.md
