> For the complete documentation index, see [llms.txt](https://docs.hmcaptcha.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hmcaptcha.com/recognition-api/slide-captcha.md).

# SLIDE Captcha

## Create task

<mark style="color:green;">`POST`</mark> `https://hmcaptcha.com/Recognition`

**SLIDE CAPTCHA**

<img src="https://486404770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZfSw37qFaqBImNsbyjFj%2Fuploads%2FKtOys2FLHziFzkwPCucK%2F7.PNG?alt=media&amp;token=06607d0a-91f5-4857-9644-8490f97acb01" alt="" data-size="original">![](https://486404770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZfSw37qFaqBImNsbyjFj%2Fuploads%2F5vLKnxJyOkntYM2qEcJ4%2Fphoto_1_2022-12-12_15-07-13.jpg?alt=media\&token=1dfa575d-b4c1-48ce-bd57-c0d1ce10e593)![](https://486404770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZfSw37qFaqBImNsbyjFj%2Fuploads%2FtGneREzOVQnw4glFX3Rd%2FScreenshot_20220804-065513.png?alt=media\&token=6ef67bf0-aa99-4599-9255-6e7f9cb047f5)

![](https://486404770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZfSw37qFaqBImNsbyjFj%2Fuploads%2Fa7Z6gWpJZmcHVFjAn0uk%2Fz4002966392875_650d0609474ac30b46c71d294e247c6a.jpg?alt=media\&token=20f92780-892b-4e3d-9e8f-849953b8cbcd)![](https://486404770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZfSw37qFaqBImNsbyjFj%2Fuploads%2FJNPMWmy5CJl7m7vZgmRb%2F59.png?alt=media\&token=337af538-26b3-4926-beec-8e181b68eeba)![](https://486404770-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZfSw37qFaqBImNsbyjFj%2Fuploads%2Fe7Dhpbd7vZMUsPb9HKMH%2F2023_04_17_00_58_IMG_4893.PNG?alt=media\&token=32d0b12d-4f10-4bee-b422-83a9c802304e)

**Example** [`https://hmcaptcha.com/recognition`](https://hmcaptcha.com/recognition)

`{`\
&#x20;    `"Apikey": "YOUR APIKEY",`\
&#x20;    `"Type": "ALL_CAPTCHA_SLIDE",`\
&#x20;    `"Image": "Image as base64 encoded"`\
`}`

#### 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<mark style="color:red;">\*</mark> | String | The apikey or subscription key                                                                                                                 |
| Type<mark style="color:red;">\*</mark>   | String | <p><code>ALL\_CAPTCHA\_SLIDE</code><br><code>TIKTOK\_OBJ</code><br><code>TIKTOK\_ROTATE\_APP</code></p><p><code>TIKTOK\_ROTATE\_WEB</code></p> |
| Image                                    | String | Image encoded as base64                                                                                                                        |
| ref                                      | String | Add to get referral money                                                                                                                      |

{% tabs %}
{% tab title="200: OK OK" %}

```json
{
    "Code": 0,
    "TaskId": 123456,
    "Message": "OK"
}
```

{% endtab %}

{% tab title="200: OK FAILED" %}

```json
{
    "Code": 1,
    "Message": "Error description"
}
```

{% endtab %}
{% endtabs %}

## Get result

<mark style="color:blue;">`GET`</mark> `https://hmcaptcha.com/getResult?apikey={your_apikey}&taskid={taskid}`

**Example** [`https://hmcaptcha.com/getResult?apikey=admingoiZ4dxa1GNHH!Rt0He8KEnrfYJCz3JE&taskid=12345`](https://hmcaptcha.com/getResult?apikey=admingoiZ4dxa1GNHH!Rt0He8KEnrfYJCz3JE\&taskid=12345)

#### Query Parameters

| Name                                     | Type   | Description                          |
| ---------------------------------------- | ------ | ------------------------------------ |
| apikey<mark style="color:red;">\*</mark> | String | The user apikey. Get it in dashboard |
| taskid<mark style="color:red;">\*</mark> | String | The task id from Create Task step    |

{% tabs %}
{% tab title="200: OK PENDING - repeat the request until Status = SUCCESS or ERROR" %}

```json
{
    "Code": 0,
    "Status": "PENDING",
    "Data": null
}
```

{% endtab %}

{% tab title="200: OK PROCESSING - repeat the request until Status = SUCCESS or ERROR" %}

```json
{
    "Code": 0,
    "Status": "PROCESSING",
    "Data": null
}
```

{% endtab %}

{% tab title="200: OK SUCCESS" %}

```json
{
    "Code": 0,
    "Status": "SUCCESS",
    "Data": {
            "offset": 78, // Drag to right 78px
            "x": 210,
            "y": 652 // point button slide
        }
}
```

{% endtab %}

{% tab title="200: OK ERROR" %}

```json
{
    "Code": 0,
    "Status": "ERROR",
    "Message": "Error message detail"
    "Data": null
}
```

{% endtab %}
{% endtabs %}
