---
title: Sign in with Nostr (NIP-07)
description: NIP-07 challenge, signing, and single-call login for bitSimp.
last_updated: 2026-09-04
meta:
  contentType: how-to
---

# Sign in with Nostr (NIP-07)

1. Request a challenge:

```bash
curl -s https://bitsimp.com/api/auth/nostr/nip-07/challenge
```

2. Build a Nostr event containing the challenge (in `content` or a `["challenge", ...]` tag).

3. Sign that Nostr event.

4. Log in to create the session cookie:

```bash
curl -s -c cookies.txt -X POST https://bitsimp.com/api/auth/nostr/nip-07/login \
  -H 'content-type: application/json' \
  -d '{"pubkey":"<x-only-hex>","challenge":"<challenge>","event":<signed_event_json>}'
```

Use `cookies.txt` for authenticated API routes.
