Document who can call the loopback API and let the user pick the listen port.
This commit is contained in:
@@ -4,6 +4,18 @@ An API add-on for Firefox so agents and scripts can manage your bookmarks while
|
||||
|
||||
The shipped product is the add-on in `extension/`. This is not a bookmark sync engine, and it is not a Mozilla product.
|
||||
|
||||
## Who can use this
|
||||
|
||||
The HTTP API listens on **127.0.0.1 only** — the same computer that is running this Firefox. A local script, an editor agent, or a session you have opened on that machine (SSH, remote desktop) can call it, if it presents a secret you issued.
|
||||
|
||||
It does **not** work from chatgpt.com or other sites in a browser tab. Those programs run somewhere else and cannot see this port. Pages open in Firefox are also blocked (requests that carry a browser `Origin` are rejected).
|
||||
|
||||
You can sit at a different computer and still use it *if* your tooling is actually running on the Firefox machine — for example you SSH in and run the client there. Pointing a remote tool at some other host’s loopback will not work.
|
||||
|
||||
If this Firefox profile syncs bookmarks with a Mozilla account, edits made here can appear on your other devices. Sync is Firefox’s feature; the API itself still only accepts connections on this machine.
|
||||
|
||||
The listen port defaults to **17634**. Change it under Manage clients if that port is already taken, and point your tools at the same port (`FAB_URL`).
|
||||
|
||||
## What it does
|
||||
|
||||
Scripts and local agents call a loopback HTTP API. The add-on performs only `browser.bookmarks` operations (create, search, move, delete, and related reads). It does not read tabs, history, cookies, or the open web.
|
||||
@@ -11,7 +23,7 @@ Scripts and local agents call a loopback HTTP API. The add-on performs only `bro
|
||||
1. Load the add-on.
|
||||
2. Toolbar → **Manage clients** → generate a secret → store that secret yourself.
|
||||
3. Register the native host once if scripts should call in (`tools/install-native-host.ps1` on Windows).
|
||||
4. Keep Firefox open. Call `http://127.0.0.1:17634` with `Authorization: Bearer <secret>`.
|
||||
4. Keep Firefox open. Call `http://127.0.0.1:<port>` (default `17634`) with `Authorization: Bearer <secret>`.
|
||||
|
||||
```http
|
||||
POST /v1/call
|
||||
|
||||
Reference in New Issue
Block a user