Skip to main content

Authentication

Authentication

All XCROP API requests require authentication via a Bearer token. Every account receives a unique API key with the prefix xc_live_.

✦
Generate your API key from the Dashboard → API Keys tab. Store it securely: it will only be shown once.

Request Header

Pass your API key in the Authorization header on every request:

Authorization headerBASH
Authorization: Bearer xc_live_4k2mNpQrT8vZxLhWcYoE9sJdFbGiUaKn

Example: cURL

curl requestBASH
curl -X POST https://xcrop.io/api/v2/search \
  -H "Authorization: Bearer xc_live_4k2mNpQrT8vZxLhWcYoE9sJdFbGiUaKn" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "#bitcoin",
    "limit": 20
  }'

Error Responses

401 UnauthorizedJSON
{
  "error": "Authentication required. Please provide an API key or log in.",
  "code": "AUTH_REQUIRED"
}
⚠
Never expose your API key in client-side code or public repositories. Use environment variables or a secrets manager.

More in Getting Started

Full documentation with search: xcrop.io/docs