# AWS WAF Captcha Proxyless

Rest API Endpoint: `https://captcha.datalabs.net/createTask`

## Creating The Task <a href="#creating-the-task" id="creating-the-task"></a>

<pre class="language-json"><code class="lang-json"><strong>POST https://captcha.datalabs.net/createTask
</strong>Host: captcha.datalabs.net
Content-Type: application/json

{
  "clientKey": "DATALABS_API_KEY",
  "task": {
    "type": "AntiAwsWafTaskProxyLess",
    "websiteURL": "https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest"
    "awsKey": "AQIDAHjcYu/GjX+QlghicBg......shMIKvZswZemrVVqA==",
    "awsIv": "CgAAFDIlckAAAAid",
    "awsContext": "7DhQfG5CmoY90ZdxdHCi8WtJ3z......njNKULdcUUVEtxTk=",
    "awsChallengeJS": "https://41bcdd4fb3cb.610cd090.us-east-1.token.awswaf.com/41bcdd4fb3cb/0d21de737ccb/cd77baa6c832/challenge.js"
    },
}
</code></pre>

### Task Parameter Table <a href="#task-parameter-table" id="task-parameter-table"></a>

<table><thead><tr><th width="189">Parameters</th><th width="162.66666666666666">Required</th><th>Description</th></tr></thead><tbody><tr><td>type</td><td>true</td><td><em><strong>AntiAwsWafTaskProxyLess</strong></em></td></tr><tr><td>websiteURL</td><td>true</td><td>The website address in which you're solving the captcha for.</td></tr><tr><td>awsKey</td><td>false</td><td>Required to be sent only when the page returns a status code of <mark style="color:red;"><code>405</code></mark> or <mark style="color:green;"><code>202</code></mark>.</td></tr><tr><td>awsIv</td><td>false</td><td>Required to be sent only when the page returns a status code of <mark style="color:red;"><code>405</code></mark> or <mark style="color:green;"><code>202</code></mark>.</td></tr><tr><td>awsContext</td><td>false</td><td>Required to be sent only when the page returns a status code of <mark style="color:red;"><code>405</code></mark> or <mark style="color:green;"><code>202</code></mark>.</td></tr><tr><td>awsChallengeJS</td><td>false</td><td>Required to be sent only when the page returns a status code of <mark style="color:red;"><code>405</code></mark> or <mark style="color:green;"><code>202</code></mark>.</td></tr></tbody></table>

### Task Created Response <a href="#task-created-response" id="task-created-response"></a>

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

<table><thead><tr><th width="184">Parameters</th><th width="370">Description</th></tr></thead><tbody><tr><td>errorId</td><td>0: Without error.<br>1: Error with request.</td></tr><tr><td>errorCode</td><td>Short code for error type.</td></tr><tr><td>errorDescription</td><td>More detailed description of the error that occurred.</td></tr><tr><td>taskId</td><td>Task ID, provided for synchronous tasks to be pushed to /getTaskResult</td></tr></tbody></table>

## Retrieving the Solution <a href="#retrieving-the-solution" id="retrieving-the-solution"></a>

```json
POST https://captcha.datalabs.net/getTaskResult
Host: captcha.datalabs.net
Content-Type: application/json

{
  "clientKey": "DATALABS_API_KEY",
  "taskId": "997993082"
}
```

### Successful Solution Response

```json
{
  "errorId":0,
  "status":"ready",
  "solution": {
    "cookie": "223d1f60-0e9f-4238-ac0a-e766b15a778e:EQoAf0APpGIKAAAA:AJam3OWp..."
  }
}
```

<table><thead><tr><th width="246">Parameters</th><th>Description</th></tr></thead><tbody><tr><td>cookie</td><td>The solutions cookie result.</td></tr></tbody></table>
