If you're testing CarsXE APIs in the sandbox and receive a 401 or 402 error, here's what you need to know and how to troubleshoot it.
401 Error – Unauthorized
A 401 error can happen for different reasons. Check the exact message in your API response.
1. Missing API key
Your request doesn't include an API key.
What to do:
Copy your API key from your CarsXE dashboard.
Add it to your request using the
keyquery parameter.Make sure the key is included in every request.
CarsXE API keys are passed as query parameters, not through authentication headers.
2. API key not found or disabled
Your API key may be incorrect, revoked, or disabled.
What to do:
Copy your API key again from the dashboard.
Check for missing characters or extra spaces.
Retry your request.
If the error continues, contact support.
3. Account not active
Your API access may be inactive because of a billing issue.
What to do:
Open your CarsXE billing page.
Check your payment status.
Update your payment method if needed.
If your payment is successful but your API access remains inactive, contact support.
402 – Payment Required
There are two different 402 responses.
1. Payment or API key required
This message can appear when the API doesn't recognize a CarsXE API key in your request.
What to do:
Confirm your API key is included as the
keyquery parameter.Make sure the complete key is being sent.
Retry your request.
If you're using a sandbox key and still receive this error, contact support so we can investigate.
2. Insufficient credits
This means your prepaid account doesn't have enough available credits to complete the request.
What to do:
Check your credit balance.
Add credits through the Billing page if your plan supports it.
If you can't purchase additional credits, contact support for available options.
Still Having Issues?
If you've checked the steps above and the error continues, please contact CarsXE support with:
Your account email.
The API endpoint you're testing.
The exact error message and response.
The time of the failed request, including your time zone.
For security, please remove your API key from any information you share.
Our team will review your request and help investigate the issue.