Authentication — XCROP API Documentation
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 → Settings → API Keys page. 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_4k2mNpQrT8vZxLhWcYoE9sJdFbGiUaKnExample — 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.