# Error codes

JSON methods return errorId 1 with errorCode and errorDescription. in.php and res.php return the error name as text, or {"status":0,"request":"ERROR_NAME"} with json=1. The HTTP status is 200 for both, so always read the body.

## Key, account and limits

| Error | Returned by | Charge | Meaning |
|---|---|---|---|
| `ERROR_KEY_DOES_NOT_EXIST` | JSON | Not charged | The key is wrong. Copy it again from the account page. (in.php and res.php: ERROR_WRONG_USER_KEY) |
| `ERROR_WRONG_USER_KEY` | in.php, res.php | Not charged | in.php and res.php: the key is wrong. Copy it again from the account page. |
| `ERROR_IP_NOT_ALLOWED` | Both | Not charged | The request came from an IP that is not on the account's allow list. Add the IP on the account page. |
| `ERROR_IP_BANNED` | Both | Not charged | This account is blocked. Contact support from the account page. |
| `ERROR_ZERO_BALANCE` | Both | Not charged | The balance does not cover the task. Add funds; nothing was charged. |
| `ERROR_TOO_MANY_REQUESTS` | Both | Not charged | Too many requests. Slow down result checks to every 5 seconds. |

## Task refused when it is sent

| Error | Returned by | Charge | Meaning |
|---|---|---|---|
| `ERROR_TASK_NOT_SUPPORTED` | JSON | Not charged | The task type is unknown or turned off. Check the type name. |
| `ERROR_BAD_PARAMETERS` | Both | Not charged | A required field is missing or has the wrong format. |
| `ERROR_PAGEURL` | Both | Not charged | websiteURL or pageurl is missing or is not a full http(s) address. |
| `ERROR_GOOGLEKEY` | in.php, res.php | Not charged | googlekey is missing on an in.php reCAPTCHA request. |
| `ERROR_BAD_PROXY` | Both | Not charged | A proxy task needs proxyAddress and proxyPort. |
| `ERROR_ZERO_CAPTCHA_FILESIZE` | Both | Not charged | The image is missing or too small. |
| `ERROR_TOO_BIG_CAPTCHA_FILESIZE` | Both | Not charged | The image is larger than 100 KB. |
| `ERROR_IMAGE_TYPE_NOT_SUPPORTED` | Both | Not charged | The image is not valid base64. |
| `ERROR_NO_SLOT_AVAILABLE` | Both | Not charged | Too many requests right now, so the task could not be accepted. Try again in a few seconds; nothing was charged. |

## Checking the result

| Error | Returned by | Charge | Meaning |
|---|---|---|---|
| `CAPCHA_NOT_READY` | in.php, res.php | Not charged | in.php and res.php only: the task is still running. Check again in 5 seconds. |
| `ERROR_WRONG_CAPTCHA_ID` | Both | Not charged | There is no task with this id on your account. |
| `ERROR_WRONG_ID_FORMAT` | in.php, res.php | Not charged | res.php: the id is missing or is not a number. |
| `ERROR_CAPTCHA_UNSOLVABLE` | Both | Refunded | The task could not be solved in time. Its charge is back on your balance. |
| `ERROR_PROXY_CONNECTION_FAILED` | Both | Refunded | The solver could not connect through your proxy. Check that it is online and the login is right. |

> A task can also fail after it was accepted, for example when the page parameters are wrong. getTaskResult then returns the reason as errorCode (one of the codes above) and the charge is already back on the balance.
