# prov.identify.getAssessment

prov.identify.getAssessment in Node SDK.

## Signature

```ts
prov.identify.getAssessment(id: string, opts?: { raw?: boolean }): Promise<TrafficAssessment | Record<string, unknown>>
```

## Parameters

- `id` (string)
- `opts` ({ raw?: boolean }, optional)

## Returns

`Promise<TrafficAssessment | Record<string, unknown>>`

## HTTP operation

[`GET /v1/identify/assessments/{id}`](https://provenanceauth.com/docs/api/traffic-checks.md#get-v1-identify-assessments-id): Retrieve a traffic assessment

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`resource_missing`](https://provenanceauth.com/docs/platform/errors.md#resource_missing)

## Example

**Node**

```ts
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "request": {
      "method": "GET",
      "url": "https://harborbean.example/products",
      "headers": {
        "user-agent": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
      }
    }
  }),
})).json();
const trafficAssessmentId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/identify/assessments/${trafficAssessmentId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/identify/assessments", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "request": {
        "method": "GET",
        "url": "https://harborbean.example/products",
        "headers": {
            "user-agent": "Mozilla/5.0 (compatible; GPTBot/1.1; +https://openai.com/gptbot)"
        }
    }
}).json()
traffic_assessment_id = step1["id"]
data = httpx.get(f"{api}/v1/identify/assessments/{traffic_assessment_id}", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```
