ANTICAPTCHA.TOP - API Docs - V2
  • Hướng dẫn
  • Sử dụng API
    • API lấy số dư tài khoản
    • API lấy dịch vụ
    • API giải captcha
      • Image to Text - Captcha dạng ảnh
      • Shopee Slide Captcha
      • ReCAPTCHA V2
      • ReCAPTCHA V2 Enterprise
      • ReCAPTCHA V3
      • ReCAPTCHA V3 Enterprise
      • Cloudflare Turnstile/Challenge
      • GeeTest Captcha V3
      • GeeTest Captcha V4
      • Amazon AWF
      • TikTok kéo thả - Web
      • TikTok chọn 2 đối tượng - Web
      • TikTok xoay đối tượng - Web
      • TikTok kéo thả - App
      • TikTok chọn 2 đối tượng - App
      • Zalo kéo thả - App
      • Zalo chọn hình ảnh - Web
  • Extension cho trình duyệt
    • Extension AntiCaptcha.top cho Chrome/Cốc Cốc
    • Extension AntiCaptcha.top cho Firefox
Powered by GitBook
On this page
  • 1. Tạo yêu cầu/Request
  • 2. Kết quả trả về/Response
  • 3. Code mẫu
  • Lưu ý: Nên sử dụng phần mềm PostMan để kiểm tra chạy test trước
  1. Sử dụng API
  2. API giải captcha

Zalo chọn hình ảnh - Web

Hướng dẫn sử dụng API giải Captcha Zalo chọn hình ảnh - Web của anticaptcha.top

PreviousZalo kéo thả - AppNextExtension AntiCaptcha.top cho Chrome/Cốc Cốc

Last updated 9 hours ago

Captcha Zalo chọn hình ảnh trên Web là một loại hình ảnh xác thực phổ biến trông giống như thế này:

1. Tạo yêu cầu/Request

POST : https://anticaptcha.top/api/captcha

Các tham số Body:

Tên trường dữ liệu

Kiểu dữ liệu

Bắt buộc

Mô tả

apikey

String

x

Key duy nhất để xác định đối tác API

type

Integer

47

Truyền vào giá trị là 47

img

String

x

imginstructions

String

x

POST HTTP
Url: https://anticaptcha.top/api/captcha
Content-Type: application/json

{
	"apikey": "YOUR_API_KEY",
	"type": 47, // id loại captcha zalo chọn hình ảnh - web
	"img": "image base64 encoded",
	"imginstructions": "Chọn tất cả hình ảnh có: con mèo" // thay bằng text hiện ở captcha của bạn
}

2. Kết quả trả về/Response

Kết quả trả về dạng JSON gồm các trường sau

Tên trường dữ liệu

Kiểu dữ liệu

Mô tả

success

boolean

Mã thông báo xác định kết quả của bước gửi captcha qua POST

true: Thành công false: Thất bại

message

String

Thông báo tương ứng nếu có

captcha

String

kết quả trả về

base64img

String

{
	"success": true,
	"message": "Thành công",
	"captcha": "{\"objects\":[2,5,6,9]}", //kết quả giải ra
	"base64img": ""
}
objects: tập hợp thứ tự các ảnh cần chọn
quy tắc đánh số thứ tự ảnh: từ trái sang phải từ trên xuống dưới 1-9
{
	"success": false,
	"message": null,
	"captcha": null,
	"base64img": ""
}

hoặc

{
	"success": false,
	"message": "Số xu không đủ",
	"captcha": ""
}

hoặc

{
	"success": false,
	"message": "Api key không chính xác",
	"captcha": ""
}

3. Code mẫu

public class CatpchaResult
{
    public string log { get; set; }
    public bool status { get; set; }
    public string catcha { get; set; }
}
public class AnticaptchaTopApi
{
    public string apiKey = "";
    public string Post(string url, object data, string method = "POST")
    {
        int num = 0;
        NameValueCollection values;
        while (num < 1)
        {
            try
            {
                using (WebClient webClient = new WebClient())
                {
                    values = new NameValueCollection();
                    if (data != null)
                    {
                        data.GetType().GetProperties().ToList().ForEach(delegate (PropertyInfo pi)
                        {
                            values.Add(pi.Name, (pi.GetValue(data, null) ?? "").ToString());
                        });
                        byte[] bytes = webClient.UploadValues(url, method, values);
                        return Encoding.UTF8.GetString(bytes);
                    }
                    return webClient.DownloadString(url);
                }
             }
            catch
            {                
            }
        }
        return "";
    }
    public CatpchaResult GetCatpcha(int type,string img,string imginstructions)
    {
        var data = new
        {
            apikey = apiKey,
            type = type,
            img = img,
            imginstructions = imginstructions
        };
        var rs = new CatpchaResult
        {
            status = false
        };
        try
        {
            var result = JsonConvert.DeserializeObject<dynamic>(Post("https://anticaptcha.top/api/captcha", data));
            if (result.success == true)
            {
                rs.status = true;
                rs.catcha = result.captcha;
                rs.log = result.message;
            }
        }
        catch
        {
        }
        return rs;
    }
}
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => "https://anticaptcha.top/api/captcha",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"apikey\"\r\n\r\n[apikey]\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\n47\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"img\"\r\n\r\n[base64 ảnh]\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"imginstructions\"\r\n\r\n[text câu hỏi]\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var form = new FormData();
form.append("apikey", "[apikey]");
form.append("type", "47");
form.append("img", "[base64 ảnh]");
form.append("imginstructions", "[text câu hỏi]");
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://anticaptcha.top/api/captcha",
  "method": "POST",
  "headers": {
    "cache-control": "no-cache"
  },
  "processData": false,
  "contentType": false,
  "mimeType": "multipart/form-data",
  "data": form
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

Lưu ý: Nên sử dụng phần mềm PostMan để kiểm tra chạy test trước

ảnh dạng base64 của ảnh chụp màn hình điện thoại mà có captcha Ảnh như ví dụ sau:

text câu hỏi captcha

Captcha Zalo chọn ảnh trên mobile