btcintel

The signed-in key or account, its tier, quota and live sessions

GET /v1/auth/me
quién puede llamarla
Una sesión
qué cuesta
1 petición de la cuota
niveles y claves
cuán reciente
Nunca en caché
cada respuesta lleva la altura del índice y la del nodo
Herramienta MCP
Ninguna
En esta página

A session cookie (a NIP-98 login or an account sign-in) or a NIP-98 header on this request; auth says which. Sessions list the caller's own live sessions (current marks this one); user_agent_hash is the SHA-256 of the User-Agent seen at login, never the string.

Parámetros

No toma parámetros.

Qué responde

The caller.

CampoTipoQué lleva
pubkeystringThe t3 public key, 64 hex characters; absent for an account without a linked key.
npubstringThe key as an npub. Absent with pubkey.
tierstringThe caller's tier: t3 for a signed-in key, t4 for an account.
authstringHow this request was authenticated.
accountobjectThe account of a t4 session; absent for a t3 key.
aalintegerThe assurance level in force on this session: 2 after a passkey sign-in or within a step-up window.
amrarrayThe methods that produced this session: nip98, password, link, passkey, totp, recovery, google, github, apple, oidc.
password_reset_onlybooleanThis session came from a reset link and may only set a new password.
second_factorarrayThe account's second factors; empty when none.
recovery_codes_leftintegerThe account's recovery codes not used yet. Only for an account.
signing_identityobjectThe account's live Nostr key: custodied by btcintel's signer or connected by the person's own signer. Absent from /v1/auth/me when the account has none.
retired_keyobjectA custodied key the account's own key replaced, which the signer keeps and exports for 30 days; absent when there is none.
quotaobjectWhat the caller's tier allows.
sessionsarrayThe caller's live sessions: the account's, or the key's.
sessions[].idstringThe session's id, 64 hex: the SHA-256 of its cookie token, and the id DELETE /v1/auth/sessions/{id} takes.
sessions[].created_atstringWhen the session was opened.
sessions[].expires_atstringWhen it ends.
sessions[].amrarrayThe methods that opened and lifted it. Absent when it records none.
sessions[].last_seen_atstring o nullWhen it was last used.
sessions[].currentbooleanTrue for the session this request came with.
sessions[].user_agent_hashstringThe SHA-256 of the User-Agent of the browser that opened it, hex. Absent when that browser sent none.
esquema AuthMe
  • pubkey string — The t3 public key, 64 hex characters; absent for an account without a linked key.
  • npub string — The key as an npub. Absent with pubkey.
  • tier string obligatorio — The caller's tier: t3 for a signed-in key, t4 for an account. · uno de "t3", "t4"
  • auth string obligatorio — How this request was authenticated. · uno de "session", "nip98"
  • account object — The account of a t4 session; absent for a t3 key.
    • id integer (int64) obligatorio — The account's id.
    • email string — Lower case; absent once the account is anonymised.
    • display_name string — The account's display name. Absent when it has none.
    • providers array de string — The sign-in providers bound to the account; empty when none.
    • created_at string (date-time) obligatorio — When the account was created.
  • aal integer — The assurance level in force on this session: 2 after a passkey sign-in or within a step-up window. · uno de 1, 2
  • amr array de string — The methods that produced this session: nip98, password, link, passkey, totp, recovery, google, github, apple, oidc.
  • password_reset_only boolean — This session came from a reset link and may only set a new password.
  • second_factor array de string — The account's second factors; empty when none.
  • recovery_codes_left integer — The account's recovery codes not used yet. Only for an account.
  • signing_identity SigningIdentity — The account's live Nostr key: custodied by btcintel's signer or connected by the person's own signer. Absent from /v1/auth/me when the account has none.
    • pubkey string obligatorio — 64 hex characters.
    • npub string obligatorio — The key as an npub (NIP-19).
    • source string obligatorio — How the key signs: custodied by btcintel's signer, or the person's own through nip07 (a browser extension), nip46 (a remote signer) or nip55 (an Android signer). · uno de "custodied", "nip07", "nip46", "nip55"
    • linked_at string (date-time) obligatorio — When the key was linked to the account.
    • exportable boolean obligatorio — True for a custodied key: POST /v1/auth/npub/export hands it over.
    • exported_at string (date-time) — When a custodied key was last exported; absent until then, and while the signer does not answer.
    • clients array de SignerClient — The NIP-46 apps connected to a custodied key; empty when none, absent while the signer does not answer.
      • client_pubkey string obligatorio — The app's pubkey, 64 hex characters.
      • name string obligatorio — What the account called the app when it made the link; may be empty.
      • perms array de string obligatorio — What the app may ask for: sign_event:<kind>, sign_event, nip44_encrypt, nip44_decrypt, nip04_encrypt, nip04_decrypt.
      • connected_at string (date-time) obligatorio — When the app connected.
      • last_used_at string (date-time) — Absent until the app's first request after connecting.
  • retired_key object — A custodied key the account's own key replaced, which the signer keeps and exports for 30 days; absent when there is none.
    • pubkey string obligatorio — The retired key, 64 hex.
    • npub string obligatorio — That key as an npub.
    • retired_at string (date-time) obligatorio — When the account's own key replaced it.
    • kept_until string (date-time) obligatorio — Until when the signer keeps it and can export it.
  • quota Quota — What the caller's tier 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 de string — The scopes of the tier. Absent from a key's row, whose own scopes stand beside it.
  • sessions array de object obligatorio — The caller's live sessions: the account's, or the key's.
    • id string — The session's id, 64 hex: the SHA-256 of its cookie token, and the id DELETE /v1/auth/sessions/{id} takes.
    • created_at string (date-time) — When the session was opened.
    • expires_at string (date-time) — When it ends.
    • amr array de string — The methods that opened and lifted it. Absent when it records none.
    • last_seen_at string | null (date-time) — When it was last used.
    • current boolean — True for the session this request came with.
    • user_agent_hash string — The SHA-256 of the User-Agent of the browser that opened it, hex. Absent when that browser sent none.

Errores

EstadoCódigoCuándo
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.

Cada uno llega en el sobre de error único, y ninguno se guarda en caché: un error lleva Cache-Control: no-store.

Ejemplo

Sin fragmento. Esta ruta pide una sesión iniciada (la cookie que pone btcintel.io) o una firma NIP-98 de tu firmante Nostr, nunca una clave, así que ningún fragmento puede ejecutarla desde una shell. Ver Identidad.