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
- 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
| Field | Type | What it carries |
|---|---|---|
pubkey | string | 64 hex characters. |
npub | string | The key as an npub (NIP-19). |
tier | string | Always t3: a signed-in key's tier. |
expires_at | string | When the session ends: 30 days after the login. |
session_id | string | The row id (SHA-256 of the cookie token) as /v1/auth/me lists it. |
quota | object | What tier t3 allows. |
schema AuthSession
pubkeystring required — 64 hex characters.npubstring — The key as an npub (NIP-19).tierstring required — Alwayst3: a signed-in key's tier. · one of "t3"expires_atstring (date-time) required — When the session ends: 30 days after the login.session_idstring required — The row id (SHA-256 of the cookie token) as/v1/auth/melists it.quotaQuota — What tier t3 allows.requests_per_mininteger — The requests a minute the tier refills, on average.burst_per_mininteger — The most requests the tier lets through at once: its bucket, refilled atrequests_per_min.requests_per_dayinteger — The requests a UTC day the tier allows. 0 sets no daily cap.bulk_max_subjectsinteger — The most subjects one bulk lookup may name. 0 falls back to 20, t0's number.publish_per_dayinteger — 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 thecommunity:publishscope and an allowed npub; t0 and t1 cannot.feedback_per_dayinteger — Feedback entries per caller per UTC day.proposals_per_dayinteger — Curated proposals per caller per UTC day.disputes_per_dayinteger — Disputes per caller per UTC day.scopesarray of string — The scopes of the tier. Absent from a key's row, whose ownscopesstand beside it.
Errors
| Status | Code | When |
|---|---|---|
| 401 | unauthorized | unauthorized: 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. |
| 422 | nip98_invalid | The 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. |
| 429 | quota_exceeded | quota_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. |
| 501 | not_configured | not_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.