couponsby La Crypta
ApiAuth

Mint a Bearer session

Trade a NIP-98 signature for a 12h JWT. No body — the event already binds `u` and `method`.

POST/api/auth/session

Trade a NIP-98 signature for a 12h JWT. No body — the event already binds u and method.

Authorization<token>

Nostr <base64 of kind 27235 event>. Tags: u, method, optional payload (sha256 hex of body), and a random nonce to avoid replay.

In: header

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/api/auth/session"
{  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…",  "pubkey": "2ad91f1dca2dcd5fc89e7208d1e5059f0bac0870d63fc3bac21c7a9388fa18fd",  "expiresAt": 1762088400}