# Recaptcha V2

{% hint style="info" %}
Hướng dẫn giải recaptcha v2 bằng api capsieure
{% endhint %}

### Import

## Create task

<mark style="color:green;">`POST`</mark> `/createTask`

```
endpoint: https://api.capsieure.com/createTask
```

Tạo Task mới

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

```
{
  "clientKey": "67b6bcbb1a728ea8d563de6d169a2057",
  "task": {
    "type": "RecaptchaV2TaskProxyless",
    "websiteURL": "https://example.com/test",
    "websiteKey": "6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd",
    "isEnterprise" : false,
    "cheap": false
  }
}
```

| Name         | Type   | Description                                                     |
| ------------ | ------ | --------------------------------------------------------------- |
| `clientKey`  | string | api key lấy [tại đây](https://capsieure.com/thong-tin)          |
| `type`       | string | default: RecaptchaV2TaskProxyless                               |
| websiteURL   | string | url web chứa recaptcha                                          |
| websiteKey   | string | key của recaptcha                                               |
| isEnterprise | bool   | mặc định là false                                               |
| cheap        | bool   | mặc định false, nếu cheap bằng false sẽ là captcha tốc độ nhanh |

**Response**

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

```json
{
  "errorId": 0,
  "taskId": 7654321
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "errorId": 1,
  "message": "Lỗi ở đây"
}
```

{% endtab %}
{% endtabs %}

## Getting result

<mark style="color:green;">`POST`</mark> `/getTaskResult`

```
endpoint: https://api.capsieure.com/getTaskResult
```

Lấy kết quả

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |

**Body**

```
{
  "clientKey": "67b6bcbb1a728ea8d563de6d169a2057",
  "taskId": 7654321
}
```

| Name        | Type   | Description                                            |
| ----------- | ------ | ------------------------------------------------------ |
| `clientKey` | string | api key lấy [tại đâ](https://capsieure.com/thong-tin)y |
| taskId      | number | là kết quả trả về của createTask bên trên              |

**Response**

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

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "errorId": 0,
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "answer"
  }
}

hoặc đang tiến trình

{
  "errorId": 0,
  "status": "processing"
}
</code></pre>

{% endtab %}

{% tab title="400" %}

```json
{
  "errorId": 1,
  "status": "Báo lỗi ở đây"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.capsieure.com/getting-started/quickstart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
