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

# Authentication

> Authenticate to DarkRecon with an API key header.

# Authentication

All DarkRecon endpoints require an API key header.

## Header

* `X-API-Key: <your_api_key>`

<Note>
  Keep the API key server-side. DarkRecon is designed for backend or trusted service-to-service usage, not direct browser exposure.
</Note>

## Example

```bash theme={null}
curl -X GET "https://darkrecon.1337807.xyz/scan/YOUR_SCAN_ID" \
  -H "X-API-Key: $DARKRECON_API_KEY"
```

## Observed error behavior

* Missing `X-API-Key` currently returns `422` with a validation payload from the API framework.
* Invalid or revoked API keys return `403` with a standard error body.

Missing header example:

```json theme={null}
{
  "detail": [
    {
      "type": "missing",
      "loc": ["header", "x-api-key"],
      "msg": "Field required",
      "input": null
    }
  ]
}
```

Invalid key example:

```json theme={null}
{
  "detail": "Could not validate API key"
}
```

See `/platform/authentication` for broader TechSlayers platform guidance.
