# prov.authorize.calls.check

prov.authorize.calls.check in Node SDK. Check an incoming call: which agent, which operator, whether a person approved it, the scope and a signed receipt.

## Signature

```ts
prov.authorize.calls.check(params: CallCheckParams): Promise<CallCheck>
```

## Parameters

- `params` (CallCheckParams)

## Returns

`Promise<CallCheck>`

## HTTP operation

[`POST /v1/authorize/call_checks`](https://provenanceauth.com/docs/api/call-checks.md#post-v1-authorize-call-checks): Check an incoming call

## Errors

- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`parameter_missing`](https://provenanceauth.com/docs/platform/errors.md#parameter_missing)
- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope)
- [`call_line_unverified`](https://provenanceauth.com/docs/platform/errors.md#call_line_unverified)
- [`trial_ended`](https://provenanceauth.com/docs/platform/errors.md#trial_ended)
- [`spend_cap_reached`](https://provenanceauth.com/docs/platform/errors.md#spend_cap_reached)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`calls_not_configured`](https://provenanceauth.com/docs/platform/errors.md#calls_not_configured)

## Example

**Node**

```ts
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
  body: JSON.stringify({ "from": "+14155550100", "to": "+14155550123" }),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
data = httpx.post(f"{api}/v1/authorize/call_checks", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
    "from": "+14155550100",
    "to": "+14155550123"
}).json()
```
