btcintel

A nonce that binds the next NIP-98 login to this browser

GET /v1/auth/nonce
who may call it
Anyone
no key and no session
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

32 random bytes as URL-safe base64, ten minutes, single use, kept in memory; the same value is set as the cookie btci_login (HttpOnly; Secure; SameSite=Lax; Path=/v1/auth/; Max-Age=600). The login event carries it in a nonce tag, and POST /v1/auth/nip98 accepts the login only when the tag and the cookie agree and the nonce is unspent: an event another page obtained opens nothing. Readable from the explorer's origins only (CORS). Sixty per client address per hour.

Parameters

It takes no parameters.

What it answers

The nonce; the cookie is on the response.

Headers: Set-Cookie

FieldTypeWhat it carries
noncestringThe nonce: put it in the login event's nonce tag. The same value is in the btci_login cookie set with it, and it works once.
expires_atstringWhen the nonce lapses: ten minutes after it was made.
schema
  • nonce string required — The nonce: put it in the login event's nonce tag. The same value is in the btci_login cookie set with it, and it works once.
  • expires_at string (date-time) required — When the nonce lapses: ten minutes after it was made.

Errors

StatusCodeWhen
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 is a step of signing in, which runs in your browser on btcintel.io, so no snippet can run it from a shell. See Identity.