# buzz.bookhive.getPersonalBookFile

> Download the raw ebook file for a book in the authenticated user's personal library. Responds with the stored bytes, a strong ETag equal to the content hash, and a `Content-Disposition: attachment` filename. Honours `If-None-Match` with a 304, so an e-reader syncing on a schedule does not re-download every book. The XRPC equivalent of GET /opds/books/{hash}/download/{name}.ext.

- Kind: query
- Authority: bookhive.buzz
- Lexicon: 1
- Published by [bookhive.buzz](https://lexicon.garden/identity/did:plc:enu2j5xjlqsjaylv3du4myh4), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.getPersonalBookFile)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.getPersonalBookFile/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.getPersonalBookFile/analytics)

## Query (`buzz.bookhive.getPersonalBookFile`)

Type: query · GET

### Parameters (query string)

- `contentHash` (string, required): Content hash identifying the book, as returned by getPersonalLibrary

### Output (application/epub+zip,application/x-mobipocket-ebook,application/x-fictionbook+xml,application/vnd.comicbook+zip,application/octet-stream)


### Errors

- `NotFound`: No such book in the caller's library, or its file is missing from disk

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Download the raw ebook file for a book in the authenticated user's personal library. Responds with the stored bytes, a strong ETag equal to the content hash, and a `Content-Disposition: attachment` filename. Honours `If-None-Match` with a 304, so an e-reader syncing on a schedule does not re-download every book. The XRPC equivalent of GET /opds/books/{hash}/download/{name}.ext.",
      "errors": [
        {
          "description": "No such book in the caller's library, or its file is missing from disk",
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/epub+zip,application/x-mobipocket-ebook,application/x-fictionbook+xml,application/vnd.comicbook+zip,application/octet-stream"
      },
      "parameters": {
        "properties": {
          "contentHash": {
            "description": "Content hash identifying the book, as returned by getPersonalLibrary",
            "type": "string"
          }
        },
        "required": [
          "contentHash"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "buzz.bookhive.getPersonalBookFile",
  "lexicon": 1
}
```
