# Recaptcha V3

{% hint style="info" %}
Hướng dẫn giải recaptcha v3 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": "RecaptchaV3TaskProxyless",
    "websiteURL": "https://example.com/test",
    "websiteKey": "6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd",
    "isEnterprise" : false,
    "minScore" : 0.3,
    "pageAction": "verify",
     "cheap": false
  }
}
```

| Name         | Type    | Description                                                     |
| ------------ | ------- | --------------------------------------------------------------- |
| clientKey    | string  | api key lấy [tại đây](https://capsieure.com/thong-tin)          |
| type         | string  | default: RecaptchaV3TaskProxyless                               |
| websiteURL   | string  | url web chứa recaptcha                                          |
| websiteKey   | string  | key của recaptcha                                               |
| isEnterprise | bool    | mặc định là false                                               |
| minScore     | decimal | giá trị từ 0.1-0.9                                              |
| pageAction   | string  | hành động của bạn trên web này mặc định "verify"                |
| 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" %}

```json
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "gRecaptchaResponse": "3AHJ_VuvYIBNBW5yyv0zRYJ7......."
  }
}

hoặc đang tiến trình

{
  "errorId": 0,
  "status": "processing"
}
```

{% endtab %}

{% tab title="400" %}

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

{% endtab %}
{% endtabs %}
