Skip to main content
The gobang captcha is a common image challenge that asks the user to swap the positions of two balls on a 5×5 grid so that five identical balls line up in a row (horizontally, vertically, or diagonally).

1. Create a task

Request

POST https://api.omocaptcha.com/v2/createTask

Response

Success:
The server returns errorId = 0 and a taskId when the task is created successfully. Failure:
The server returns errorId = 1 along with the corresponding errorCode.

2. Get the task result

Request

POST https://api.omocaptcha.com/v2/getTaskResult

Response

Success:
The server returns errorId = 0 and status = ready. Read the result from the solution field.
solution.swap_positions is a pair of cell indices to swap on the 5×5 grid. Cells are numbered from 0 to 24, left-to-right and top-to-bottom (top-left cell is 0, top-right cell is 4, first cell of row 2 is 5, …, bottom-right cell is 24). Drag the ball from the first cell onto the second cell (or vice versa) to solve the captcha.
Processing:
The server returns errorId = 0 and status = processing. Wait 2 seconds and poll again. Failure:
The server returns errorId = 1 when the task fails.