The signed-in key or account, its tier, quota and live sessions
GET /v1/auth/me- quién puede llamarla
- Una sesión
- 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.
| Campo | Tipo | Qué lleva |
|---|---|---|
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 | The caller's tier: t3 for a signed-in key, t4 for an account. |
auth | string | How this request was authenticated. |
account | object | The account of a t4 session; absent for a t3 key. |
aal | integer | The assurance level in force on this session: 2 after a passkey sign-in or within a step-up window. |
amr | array | 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 | 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 | object | 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. |
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. |
quota | object | What the caller's tier allows. |
sessions | array | The caller's live sessions: the account's, or the key's. |
sessions[].id | string | The session's id, 64 hex: the SHA-256 of its cookie token, and the id DELETE /v1/auth/sessions/{id} takes. |
sessions[].created_at | string | When the session was opened. |
sessions[].expires_at | string | When it ends. |
sessions[].amr | array | The methods that opened and lifted it. Absent when it records none. |
sessions[].last_seen_at | string o null | When it was last used. |
sessions[].current | boolean | True for the session this request came with. |
sessions[].user_agent_hash | string | The SHA-256 of the User-Agent of the browser that opened it, hex. Absent when that browser sent none. |
esquema AuthMe
pubkeystring — The t3 public key, 64 hex characters; absent for an account without a linked key.npubstring — The key as an npub. Absent withpubkey.tierstring obligatorio — The caller's tier:t3for a signed-in key,t4for an account. · uno de "t3", "t4"authstring obligatorio — How this request was authenticated. · uno de "session", "nip98"accountobject — The account of a t4 session; absent for a t3 key.idinteger (int64) obligatorio — The account's id.emailstring — Lower case; absent once the account is anonymised.display_namestring — The account's display name. Absent when it has none.providersarray de string — The sign-in providers bound to the account; empty when none.created_atstring (date-time) obligatorio — When the account was created.
aalinteger — The assurance level in force on this session: 2 after a passkey sign-in or within a step-up window. · uno de 1, 2amrarray de string — The methods that produced this session: nip98, password, link, passkey, totp, recovery, google, github, apple, oidc.password_reset_onlyboolean — This session came from a reset link and may only set a new password.second_factorarray de string — The account's second factors; empty when none.recovery_codes_leftinteger — The account's recovery codes not used yet. Only for an account.signing_identitySigningIdentity — The account's live Nostr key: custodied by btcintel's signer or connected by the person's own signer. Absent from/v1/auth/mewhen the account has none.pubkeystring obligatorio — 64 hex characters.npubstring obligatorio — The key as an npub (NIP-19).sourcestring obligatorio — How the key signs:custodiedby btcintel's signer, or the person's own throughnip07(a browser extension),nip46(a remote signer) ornip55(an Android signer). · uno de "custodied", "nip07", "nip46", "nip55"linked_atstring (date-time) obligatorio — When the key was linked to the account.exportableboolean obligatorio — True for a custodied key:POST /v1/auth/npub/exporthands it over.exported_atstring (date-time) — When a custodied key was last exported; absent until then, and while the signer does not answer.clientsarray de SignerClient — The NIP-46 apps connected to a custodied key; empty when none, absent while the signer does not answer.client_pubkeystring obligatorio — The app's pubkey, 64 hex characters.namestring obligatorio — What the account called the app when it made the link; may be empty.permsarray de string obligatorio — What the app may ask for:sign_event:<kind>,sign_event,nip44_encrypt,nip44_decrypt,nip04_encrypt,nip04_decrypt.connected_atstring (date-time) obligatorio — When the app connected.last_used_atstring (date-time) — Absent until the app's first request after connecting.
retired_keyobject — A custodied key the account's own key replaced, which the signer keeps and exports for 30 days; absent when there is none.pubkeystring obligatorio — The retired key, 64 hex.npubstring obligatorio — That key as an npub.retired_atstring (date-time) obligatorio — When the account's own key replaced it.kept_untilstring (date-time) obligatorio — Until when the signer keeps it and can export it.
quotaQuota — What the caller's tier 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 de string — The scopes of the tier. Absent from a key's row, whose ownscopesstand beside it.
sessionsarray de object obligatorio — The caller's live sessions: the account's, or the key's.idstring — The session's id, 64 hex: the SHA-256 of its cookie token, and the idDELETE /v1/auth/sessions/{id}takes.created_atstring (date-time) — When the session was opened.expires_atstring (date-time) — When it ends.amrarray de string — The methods that opened and lifted it. Absent when it records none.last_seen_atstring | null (date-time) — When it was last used.currentboolean — True for the session this request came with.user_agent_hashstring — The SHA-256 of the User-Agent of the browser that opened it, hex. Absent when that browser sent none.
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 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. |
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.