# Authentication and IP whitelist

> Authenticate Harem Gold API calls with the X-API-Key header or a Bearer token, keep keys safe, and lock them to your server addresses with the IP whitelist.

Source: https://docs.pixcharp.com/en/authentication · Last updated: 2026-11-27

Every REST request and WebSocket connection is authenticated with an API key. This page shows how to send the key and how the IP whitelist limits it to your own servers.

## Authentication

Use either `X-API-Key` or a Bearer token. Do not expose your key in browser bundles, mobile binaries, screenshots, or logs.

- Header: `X-API-Key: pxa_live_...`
- Bearer: `Authorization: Bearer pxa_live_...`
- Format: `pxa_live_...`

## IP whitelist

Add your server addresses in the customer dashboard. While the list is empty, every address is accepted. Once it has entries, REST and WebSocket calls from any other address get `403 ip_not_allowed`, and those calls do not use your quota. Single IPv4 and IPv6 addresses and CIDR ranges are accepted; Starter allows 1 entry, Pro 4 and Business 10.

```json
{
  "title": "ip_not_allowed",
  "status": 403,
  "detail": "Requests from 198.51.100.9 are not allowed for this API client. Add the address to the allowed IP list."
}
```

The detail shows the address the API saw, which is the one to add when you are unsure of your server's outbound IP.

## Links

- Documentation home: https://docs.pixcharp.com/en
- Product page and plans: https://pixcharp.com/en/harem-gold-api
- Customer dashboard: https://panel.pixcharp.com/en/api/login
- JavaScript/TypeScript client (open source): https://github.com/Baristopal/harem-altin-api
- Türkçe sürüm: https://docs.pixcharp.com/kimlik-dogrulama.md
- Contact: hello@pixcharp.com
