btcintel

Sign in with a NIP-98 event and open a T3 session

POST /v1/auth/nip98
who may call it
A session
a NIP-98 signature
what it costs
1 request of the quota
tiers and keys
how fresh
Never cached
every answer carries the index's height and the node's
MCP tool
None
On this page

The request carries Authorization: Nostr <base64(kind 27235 event)> per NIP-98: tag u = this exact URL, method = POST, created_at within ±60 s, a payload tag (SHA-256 of the body) whenever a body is sent; the signature verifies; the event id is single use. A nonce tag must equal the btci_login cookie that GET /v1/auth/nonce set in this browser and name an unspent nonce; the login spends it. While LOGIN_NONCE_REQUIRED is false a login without the tag is accepted and counted; with it true, refused (401). On success a session of 30 days is created and the cookie btci_session is set (HttpOnly; Secure; SameSite=Lax; Path=/; Domain=.btcintel.io). No account, password or email exists: the identity is the public key, and no private key ever reaches btcintel. At most 10 logins per key and 30 per address each hour.

Parameters

It takes no parameters.

What it answers

201 · application/json

The session is open; the cookie is on the response.

Headers: Set-Cookie

FieldTypeWhat it carries
pubkeystring64 hex characters.
npubstringThe key as an npub (NIP-19).
tierstringAlways t3: a signed-in key's tier.
expires_atstringWhen the session ends: 30 days after the login.
session_idstringThe row id (SHA-256 of the cookie token) as /v1/auth/me lists it.
quotaobjectWhat tier t3 allows.
schema AuthSession
  • pubkey string required — 64 hex characters.
  • npub string — The key as an npub (NIP-19).
  • tier string required — Always t3: a signed-in key's tier. · one of "t3"
  • expires_at string (date-time) required — When the session ends: 30 days after the login.
  • session_id string required — The row id (SHA-256 of the cookie token) as /v1/auth/me lists it.
  • quota Quota — What tier t3 allows.
    • requests_per_min integer — The requests a minute the tier refills, on average.
    • burst_per_min integer — The most requests the tier lets through at once: its bucket, refilled at requests_per_min.
    • requests_per_day integer — The requests a UTC day the tier allows. 0 sets no daily cap.
    • bulk_max_subjects integer — The most subjects one bulk lookup may name. 0 falls back to 20, t0's number.
    • publish_per_day integer — The Community events a UTC day each author may publish through the API at this tier. 0 sets no daily cap. Who may publish at all is decided apart: a person signed in with their key, or a key with the community:publish scope and an allowed npub; t0 and t1 cannot.
    • feedback_per_day integer — Feedback entries per caller per UTC day.
    • proposals_per_day integer — Curated proposals per caller per UTC day.
    • disputes_per_day integer — Disputes per caller per UTC day.
    • scopes array of string — The scopes of the tier. Absent from a key's row, whose own scopes stand beside it.

Errors

StatusCodeWhen
401unauthorizedunauthorized: the request does not say who makes it, or what it offers does not verify: no key or session where one is needed, or a password, a code, a passkey or a signed event that does not check. The message says what is missing.
422nip98_invalidThe NIP-98 event was refused (nip98_invalid): wrong URL or method, stale, bad signature, wrong payload hash, or used before; the message names the reason.
429quota_exceededquota_exceeded: the caller's tier ran out of requests for the minute or the day. Retry-After says when to try again; every rate-limited answer carries X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and X-RateLimit-Tier. While the deployment runs in log-only mode the decision is logged instead and X-RateLimit-Policy: log-only is set.
501not_configurednot_configured: this deployment does not run what the route needs, for example the mempool engine, accounts, the intel store or watchlists. The message names it.

Each comes in the one error envelope, and none is cached: an error carries Cache-Control: no-store.

Example

No snippet. This route takes a signed-in session (the cookie btcintel.io sets) or a NIP-98 signature from your Nostr signer, never a key, so no snippet can run it from a shell. See Identity.