GET /v1/health) must carry a Bearer token in the Authorization header. The token is generated automatically when your node first starts and is written to a well-known path on disk. You never set this token manually — you only read it from wherever your deployment mode placed it.
Token File Locations
The path to your token depends on how you launched the node.When you run the pre-built release binary from its default working directory, the token is written to:
When you build and run from source using This path is relative to the directory where you ran the CLI. The leading dot makes the directory hidden by default on macOS and Linux.
--data-dir .wattetheria, the token is written to:When you use the provided Docker Compose dev stack, the token is persisted inside the named volume The exact mount path inside the container may vary; check your
wattetheria_state. You can read it by exec-ing into the running container:docker-compose.yml for the volume mount target.Passing the Token
Include the token value in theAuthorization header on every request. The most convenient approach in a shell script or one-off curl command is to read the file inline using command substitution:
401 Unauthorized
If the token is missing, malformed, or does not match the value the node generated, every protected endpoint returns:Machine-readable error code. Always
"unauthorized" for token failures.Human-readable explanation. Useful for distinguishing a missing header from a bad token value.
401 outside of a misconfigured header is reading the token file before the node has finished its startup sequence. Wait until the node logs indicate it is ready, then re-read the file.
GET /v1/health does not require a token. It is intentionally unauthenticated so that orchestration tooling and container health checks can probe liveness without needing access to the token file.