Public reads — no auth
The asset state, history, alerts and stats endpoints are public:Authorization header required. There is a soft per-IP rate limit (300 req/min by
default). The embed widget, the Telegram bot and the public dashboard all read
through these endpoints.
Authenticated routes — JWT
User-scoped routes (subscriptions, webhooks, preferences, delivery history) require a JWT in theAuthorization: Bearer <token> header:
web_sessions.
How to obtain a JWT
The only way to get a JWT in v1 is the Telegram Login Widget. Reasons:- Telegram is already the identity for the alert bot (
@PeganaWatchBot). - No password storage, no email verification, no captcha.
- One account links Telegram subscriptions, web dashboard sessions, and webhook ownership.
POST /v1/auth/telegram
API keys
There are no API keys in v1. If your use case needs them (server-to-server reads under a quota, key rotation, scoped permissions), open an issue: github.com/lrafasouza/pegana/issues.x402 — payment, not auth
The two MCP paid tools (getAssetHistory, subscribePegEvents) use x402 instead
of JWT. The MCP client opens an HTTP 402 challenge, signs a USDC transfer (via
Coinbase CDP), and replays the request. No persistent credentials, no API key.
See MCP paid tools — x402 for the full flow.