> ## Documentation Index
> Fetch the complete documentation index at: https://manifest.build/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# M002: Empty Bearer token

> Manifest error M002 fires when the Authorization header is set but the Bearer token is blank. Often an unexpanded env var. Returns HTTP 401.

## What you saw

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
[🦚 Manifest M002] The Bearer token is empty. Paste your Manifest key into it.
See https://manifest.build/docs/errors/M002
```

## Why it happened

The `Authorization` header is there, but the token after `Bearer ` is blank. The usual cause is an env var that didn't expand (`Bearer $MNFST_KEY` with `MNFST_KEY` unset), or a config field saved without a value.

## How to fix it

1. Log the value your client sends right before the request to confirm the token is actually empty.
2. Check your env vars or config file. If the key is missing, generate one from the [dashboard](https://app.manifest.build).
3. Set `Authorization: Bearer mnfst_<your-key>` and retry.

## Related

* [M001: Missing Authorization header](/errors/M001)
* [M003: Invalid key format](/errors/M003)
* [M005: Key not recognized](/errors/M005)
* [All error codes](/errors)
