Authorization: Bearer <key>. The deployment stores only the SHA-256 hash of each key, in parmana-local/api-keys.json. Manage that file with docker/local/api-keys.mjs, never by hand: the script checks every change with the same rules the server uses, so it never saves a file the server would refuse to start with.
All commands run from the repository root. On Windows in Git Bash, run export MSYS_NO_PATHCONV=1 first.
The server reads the keys only when it starts. After every
add or remove,
run docker compose restart api.List keys
Add a key
The command prints the new key once, on the line that starts with
pk_local_:
Examples
A service that sends refund requests:Rotate a key
-
Add a second key for the same caller ID, with the same options as the first:
Both keys now work.
- Give the holder the new key and wait until they use it.
-
Remove every older key of that caller ID, keeping the one added last:
401 and the new key 200 from GET /callers/me.
Remove a key
--keep-newest to keep the key added last, as in a rotation. It refuses to remove the last key in the file, because the server cannot start without one.