**POST** `https://api.captchasonic.com/getTaskResult`

`GET /getTaskResult`および`GET /getResponse`としても利用できます。

## リクエストの本文

| フィールド | 型 | 説明 |
|---|---|---|
| `apiKey` | `string` | [ダッシュボード](https://captchasonic.com/app)で取得したAPIキー。 |
| `taskId` | `string` | [`createTask`](/docs/start/create-task)が返した`taskId`。 |

```json
{
  "apiKey": "sonic_xxxxxxxxxxxxxxxxxxxxxxxx",
  "taskId": "FgIcYXBtKR6E"
}
```

## レスポンス

タスクがまだ解決中の間は、現在の`status`を含むタスクの情報が返ります:

```json
{
  "errorId": 0,
  "status": "idle",
  "taskId": "FgIcYXBtKR6E"
}
```

1〜2秒ごとにポーリングを続けてください。タスクが完了すると、そのCAPTCHAタイプの解決結果がレスポンスに含まれます。正確なフィールドは、各CAPTCHAのページをご覧ください。

## 例

  
**cURL**

```bash
curl -s https://api.captchasonic.com/getTaskResult \
  -H 'content-type: application/json' \
  -d '{"apiKey":"sonic_xxx","taskId":"FgIcYXBtKR6E"}'
```
  
  
**JavaScript**

```js
const res = await fetch("https://api.captchasonic.com/getTaskResult", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ apiKey: "sonic_xxx", taskId }),
});
const result = await res.json();
```
  
  
**Python**

```python
r = requests.post("https://api.captchasonic.com/getTaskResult",
                  json={"apiKey": "sonic_xxx", "taskId": task_id})
result = r.json()
```
