# Download a public document

Canonical page: https://docs.ovok.com/api/document/download-a-public-document

`GET /document/public/{token}`

Downloads the file of a public document, without a bearer token. Use it to embed a file in a web page or an email, for example in an `<img>` tag.

**Auth:** none. The public token in the path is the credential: anyone with the URL can get the file.

## Behaviour

- The token is the document's `publicToken`. A document gets one when it is created or updated with `isPublic` set to true.
- The response is `307 Temporary Redirect` to a signed file URL, as in `GET /document/{id}`, including the same resizing options (`width`, `height`, `fit`).
- A token stops working when the document is made private again, or when its public token is replaced.

## Example

```bash
curl -L 'https://api.sandbox.ovok.com/document/public/example.jwt.eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk' -o file.png
```
