Documentation

Smart Captcha API

1. Creating a SmartCaptcha task

To create a SmartCaptcha task, send a POST request to http://app.botlab.me/create with the API key in the X-API-Key header. In the body of the request, send data in JSON format.

Request

  • URL: http://app.botlab.me/create
  • Method: POST
  • Header: X-API-Key: API KEY
  • Content-Type: application/json

Request Body (JSON):

  • Type - * Mandatory. Task type, in this case “SmartCaptcha”
  • click - * Required. Base64 image of the click area.
  • task - * Required. Image with task order in Base64 format.
  • app_id - Developer's application ID (can be found in the developer referral system section)
{
  “type”: “SmartCaptcha”,
  “click”: “CLICK_BASE_64”,
  “task”: “TASK_BASE_64”
}

Image Transfer Recommendations

To ensure a quality SmartCaptcha task, it is recommended to upload images of the click area (CLICK_BASE_64) and task order (TASK_BASE_64) by downloading them from the source and then converting them to Base64 format. This helps to avoid loss and ensure the accuracy of the data passed in the request to create the task.

Answer.

After successful task creation, get a unique task identifier.

{
  “status”: 1,
  “response": ”9051d4b4-0000-44d3-a4c2-db0215227862”
}
  • status - status of request execution (1 - successful, 0 - error).
  • response - job identifier / error code

2. Getting SmartCaptcha task results

To get the results of SmartCaptcha task processing, send a POST request to http://app.botlab.me/result with the API key in the X-API-Key header. In the body of the request, pass the task ID from the previous request.

Request

  • URL: http://app.botlab.me/result
  • Method: POST
  • Header: X-API-Key: API KEY
  • Request body (JSON):
  • id - identifier of the created task

{ “id": ”9051d4b4-0000-44d3-a4c2-db0215227862” }

Answer

Get the results of the SmartCaptcha task processing as coordinates.

{
  “status”: 1,
  “response": ”coordinates:x=34.7,y=108.0;x=234.3,y=72.3;x=149.1,y=107.7;x=43.0,y=30.3;x=137.4,y=32.0”
}
  • status - status of the request execution (1 - successful, 0 - error).
  • response - x and y coordinates for each point / error code.

If you get CAPCHA_NOT_READY in the response, it means that the results are not ready yet. In such a case, it is recommended to wait 2 to 10 seconds and repeat the request for results. Repeat the request until you get a successful result (status is 1) or another status indicating an error.

Translated with DeepL.com (free version)