# Get the answer of a job (legacy path)

> NopeCHA's original poll path: GET /?id=. Errors come with HTTP 200.

`GET https://api.solvecha.com/`


The poll request of the first NopeCHA API. It returns the answer of a job that you created on the root path or on a `/v1/recognition/...` path. **Errors are answered with HTTP status 200**: while the job is not ready you get `{"error": 14, "message": "Incomplete job"}`.


> **Warning:**
> This is a legacy path for older NopeCHA clients. Use the [`/v1` paths](https://solvecha.com/docs/api/overview.md) in new code.


## Authorization

Send your API key as `Authorization: Bearer YOUR_API_KEY`. Other ways are the `key` field of the body and the `key` query parameter. See [Authentication](https://solvecha.com/docs/authentication.md).

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes | The job id. |
| `key` | string | No | Your API key, if you do not send it in the `Authorization` header. |

## Example request


**cURL**

```bash
curl "https://api.solvecha.com/?id=1234567" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Python**

```python
import requests

response = requests.get(
    "https://api.solvecha.com/?id=1234567",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)
print(response.status_code, response.json())
```

**Node.js**

```js
const response = await fetch("https://api.solvecha.com/?id=1234567", {
  headers: { Authorization: "Bearer YOUR_API_KEY" },
});
console.log(response.status, await response.json());
```

**Go**

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("GET", "https://api.solvecha.com/?id=1234567", nil)
	if err != nil {
		panic(err)
	}
	req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.StatusCode, string(out))
}
```


## Response

### 200 OK

The job is ready.

```json
{"data": [false, true, false, true, true, false, false, false, false]}
```

### Errors

HTTP status 200 with an error body:

```json
{"error": 14, "message": "Incomplete job"}
```

| Code | HTTP status | When |
|---|---|---|
| `14` Incomplete job | 200 | The job is not ready yet. Poll again in one second. |
| `10` Invalid request | 200 | The id is missing or unknown. |
| `11` Rate limit reached | 200 | Your key is above the poll requests per minute of its plan. |
| `15` Invalid key | 200 | The key is missing, malformed or unknown. |
| `9` Unknown error | 200 | Server error. Retry after a few seconds. |

All codes are on the [Errors](https://solvecha.com/docs/errors.md) page.
