How to bypass rotate slider captcha

To combat automation, websites are implementing increasingly complex types of captchas. One such captcha is the rotate captcha (rotate slider), where the user must correctly rotate an image to align it with the target fragment.

This captcha, for example, is used on OOCL.com, and solving it manually significantly slows down workflows. Fortunately, we already provide a reliable API for automatic rotation angle detection.

Rotate slider captcha example and how it works

Here is an example of a rotate captcha that needs to be solved:

example

To successfully solve the task, you will need two images at the original size of 323x153 pixels:

  1. Main image (the one to which the fragment should be aligned):
Main image
  1. Fragment image (the piece that needs to be rotated):
part

Both images must be provided in base64 format.

Submitting the captcha via API

We provide two API options for working with this type of captcha: V1 and V2. It is recommended to use the more modern API V2.

To successfully solve a Rotate captcha, two images must be correctly prepared:

  • image – the main image, to which the fragment should align after rotation, in Base64 format
  • parts – the fragment image, also in Base64 format

Image requirements:

  • Format: Base64 string
  • Size: original size 323×153 pixels
  • Quality: images must be clear and undistorted

Example request via API V1

python Copy
data = {
  "method": "rotate_slider",
  "key": my_key,
  "body": img_b64,
  "part1": part1_b64,
  "json": 1
}
response = requests.post(f"https://api.2captcha.com/in.php?", json=data)  # send request to 2captcha
print(response.text)
s = response.json()["request"]
time.sleep(7)
while True:
  result = requests.post(f"https://api.2captcha.com/res.php?key={my_key}&action=get&json=1&id={s}").json()
  if result['request'] == 'CAPCHA_NOT_READY':
    print(result['request'])
    time.sleep(3)
  else:
    break
pprint(result)

Example request via API V2

python Copy
data = {
  "clientKey": my_key,
  "task": {
    "type": "RotateSliderTask",
    "image": img_b64,
    "parts": [
      part1_b64,
    ]
  }
}
for i in range(1):
  response = requests.post("https://api.2captcha.com/createTask", json=data).json()
  print(response)
if response['errorId'] == 0:
  time.sleep(10)
  data = {
    "clientKey": my_key,
    "taskId": response['taskId']
  }
result = requests.post(f"https://api.2captcha.com/getTaskResult", json=data).json()
pprint(result)

Handling the response

In a successful API response, the solution field contains a numeric value — the rotation angle (in degrees) required to align the main image with the fragment.

Example of a successful response:

json Copy
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "angle": 178.17,
    "center": [174, 72, 63.5],
    "point_circle": [234, 66]
  }
}

Conclusion

Our rotate captcha solution allows you to easily automate processes that interact with websites using this type of verification.

The workflow is simple: prepare images, send a POST request, and get the precise rotation angle.

For our clients, we can also provide a complete working Python example with Selenium, configured for common screen resolution 1920×1080 and 125% scaling, upon request.

Need help? Open a ticket and our specialist will respond quickly.