hmcaptcha.com
  • 👨‍💻Welcome
  • 👉API - Get Balance
  • ⚠️Guide
  • Recognition API
    • 👉Tiktok Captcha
    • 👉SLIDE Captcha
  • Other
    • 👉WORKER_CASH $0.6
  • EXTENSION
    • 👉Download Extension
Powered by GitBook
On this page
  • Create task
  • Get result
  • Hướng dẫn thêm cho captcha xoay
  • Hướng dẫn thêm cho captcha chọn đối tượng giống nhau
  • Hướng dẫn thêm cho captcha slide trên phone
  1. Recognition API

Tiktok Captcha

Last updated 6 months ago

Create task

POST https://hmcaptcha.com/Recognition?wait=1

1.SLIDE CAPTCHA

Example https://hmcaptcha.com/Recognition?wait=1

{ "Apikey": "YOUR APIKEY", "Type": "ALL_CAPTCHA_SLIDE", "Image": "Image as base64 encoded" }

2.SELECT 2 OBJECT

Example https://hmcaptcha.com/Recognition?wait=1

{ "Apikey": "YOUR APIKEY", "Type": "TIKTOK_OBJ", "Image": "Image as base64 encoded", "URL_Image": "Required if Image is missing." }

Note: chỉ cần 1 trong 2 tham số `Image` hoặc `URL_Image`

3.ROTATE CAPTCHA APP

Example https://hmcaptcha.com/Recognition?wait=1

{ "Apikey": "YOUR APIKEY", "Type": "TIKTOK_ROTATE_APP", "Image": "Image as base64 encoded" }

Note: Image gửi lên là ảnh chụp màn hình hoặc ảnh chỉ lấy phần captcha

4.ROTATE CAPTCHA WEB

Example https://hmcaptcha.com/Recognition?wait=1

{ "Apikey": "YOUR APIKEY", "Type": "TIKTOK_ROTATE_WEB", "URL_Image1": "url image 1 of captcha (ảnh bên trong)", "URL_Image2": "url image 2 of captcha (ảnh bên ngoài)" }

Query Parameters

Name
Type
Description

wait

Bool

If the 'wait=1' parameter is added to the URL, the result will return immediately after the captcha is solved without needing to call 'getResult'

Headers

Name
Type
Description

Content-Type*

String

application/json

Request Body

Name
Type
Description

Apikey*

String

The apikey or subscription key

Type*

String

ALL_CAPTCHA_SLIDE TIKTOK_OBJ TIKTOK_ROTATE_APP

TIKTOK_ROTATE_WEB

Image

String

Image encoded as base64

URL_Image

String

Required if Image is missing.

Question

String

Questions in English, Not required,

default: "Select 2 objects that are the same shape"

ref

String

Add to get referral money

{
    "Code": 0,
    "TaskId": 123456,
    "Message": "OK"
}
{
    "Code": 1,
    "Message": "Error description"
}

Get result

GET https://hmcaptcha.com/getResult?apikey={your_apikey}&taskid={taskid}

Example https://hmcaptcha.com/getResult?apikey=admin_goiZ4dxa1GNHHRt0He8KEnrfYJCz3JE&taskid=12345

Query Parameters

Name
Type
Description

apikey*

String

The user apikey. Get it in dashboard

taskid*

String

The task id from Create Task step

{
    "Code": 0,
    "Status": "PENDING",
    "Data": null
}
{
    "Code": 0,
    "Status": "PROCESSING",
    "Data": null
}
{
    "Code": 0,
    "Status": "ERROR",
    "Message": "Error message detail"
    "Data": null
}
{
    "Code": 0,
    "Status": "SUCCESS",
    "Data": {
            "offset": 78, // Drag to right 78px
            "x": 210,
            "y": 652 // point button slide
        }
}
{
    "Code": 0,
    "Status": "SUCCESS",
    "Data": {
            "x1y1x2y2":"678|427|540|564",
            "raw":"0.61413,0.62064|0.48913,0.819767" // x1,y1|x2,y2 ...
        }
}
{
    "Code": 0,
    "Status": "SUCCESS",
    "Data": {
            "angle": 78
        }
}
{
    "Code": 0,
    "Status": "SUCCESS",
    "Data": {
            "angle": 78,
            "point_slide": {"x": 210, "y": 652} // point button slide
        }
}

Hướng dẫn thêm cho captcha xoay

  • Kết quả nhận được sau khi giải là độ (angle), muốn chuyển đổi sang pixel để kéo cần tính theo công thức sau:

# Tính offset
offset = angle * width * 0.00446837493
# hoặc
offset = angle * (width_slide/180)
  • Với width (độ rộng thanh trượt) được lấy như ảnh sau:

# Some code (TIKTOK_ROTATE_APP)
response = {
    "Code": 0,
    "Status": "SUCCESS",
    "Data": {
            "angle": 78,
            "point_slide": {"x": 210, "y": 652} // point button slide
        }
}

# Lấy kết quả 'angle' trong phản hồi
angle = response["Data"]["angle"]

# Tính offset
# offset = angle * width * 0.00446837493
# hoặc
offset = angle * (width_slide/180)

# Tính lại tọa độ để kéo (trên app tiktok)
x1 = response["Data"]["point_slide"]["x"]
y1 = y2 = response["Data"]["point_slide"]["y"]
x2 = x1 + offset

ADB_exec(f"adb shell input touchscreen swipe {x1} {y1} {x2} {y2}")

Hướng dẫn thêm cho captcha chọn đối tượng giống nhau

  • Kết quả nhận được: {"raw": "0.61413,0.62064|0.48913,0.819767"} // x1,y1|x2,y2 ...

  • Tính tọa độ click như sau:

# Some code (TIKTOK_OBJ)
response = {
    "raw": "0.61413,0.62064|0.48913,0.819767"
}
for pn in response['raw'].split('|'):
    xn, yn = pn.split(',')
    xn, yn = float(xn), float(yn)
    x = int(xn * image.renderWidth)
    y = int(xn * image.renderHeight)
    click(x, y)

Hướng dẫn thêm cho captcha slide trên phone

# Tiktok thêm một số tỉ lệ khiến cho kéo theo offset không chính xác
# (kéo 45px nhưng mảnh ghép chạy đến 57px rồi)
# Nếu bị thì fix bằng công thức sau
offset = offset * (45 / 57)

👉