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

# Fix 401 authentication errors

> What a 401 authentication_error means and how to resolve it.

A `401` response with `authentication_error` means the request had a missing or invalid API key.

## Check these first

1. **The key is present.** Pass it as the `api_key` URL parameter or in the `X-Api-Key` header. See [Authentication](https://docs.peopledatalabs.com/docs/authentication.md).
2. **The key is current.** Compare it with the **Active Key** on the **API Keys** page of the [API Dashboard](https://dashboard.peopledatalabs.com/). If someone replaced the key, update your code or integration.
3. **The key is intact.** Check for extra spaces, line breaks, or quotes copied with the key.
4. **The header name is correct.** Use `X-Api-Key`, not `Authorization`.

```bash theme={null}
curl -X GET \
  -H 'X-Api-Key: YOUR_API_KEY' \
  'https://api.peopledatalabs.com/v5/person/enrich?profile=linkedin.com/in/seanthorne'
```

If the key matches the dashboard and requests still fail, [contact support](https://docs.peopledatalabs.com/support/contact-support.md).


## Related topics

- [Authentication](https://docs.peopledatalabs.com/docs/authentication.md)
- [Errors & Status Codes](https://docs.peopledatalabs.com/docs/errors.md)
- [Support](https://docs.peopledatalabs.com/support/index.md)
- [Fix 429 rate limit errors](https://docs.peopledatalabs.com/support/troubleshooting/rate-limit-errors.md)
- [Fix 402 out-of-credit errors](https://docs.peopledatalabs.com/support/troubleshooting/out-of-credits.md)
