Answer the question
In order to leave comments, you need to log in
How to do anti-captcha on AJAX requests?
Judging by the documentation https://anticaptcha.atlassian.net/wiki/spaces/API/... the request template looks like this:
{
"clientKey":"dce6bcbb1a728ea8d563de6d169a2057",
"task":
{
"type":"ImageToTextTask",
"body":"BASE64_BODY_HERE!",
"phrase":false,
"case":false,
"numeric":false,
"math":0,
"minLength":0,
"maxLength":0
}
}
$.ajax({
url: "https://api.anti-captcha.com/createTask",
type: "POST",
data: {
"clientKey":"1922a44efdd8fe67241ebbacc51a9655",
"task": {
"type":"ImageToTextTask",
"body":"тут картинка с капчей в BASE64, для Тостера многовато букв",
"phrase":false,
"case":false,
"numeric":false,
"math":0,
"minLength":0,
"maxLength":0
}
},
success: function(r){
console.log(r);
},
dataType: "json"
});
errorCode:"ERROR_TASK_ABSENT"
errorDescription:"Task property is empty or not set. Please refer to API v2 documentation."
errorId:22
Answer the question
In order to leave comments, you need to log in
Request format: JSON POST
JSON.stringify data before sending
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question