# prov.authorize.calls.check

prov.authorize.calls.check in Python SDK. Check an incoming call (`from_` is the calling number; `from` is a Python keyword).

## Signature

```python
prov.authorize.calls.check(from_: str, to: str, at: Optional[str] = …, code: Optional[str] = …, challenge: Optional[bool] = …, wait: Optional[int] = …) -> Any
```

## Parameters

- `from_` (str)
- `to` (str)
- `at` (Optional[str], optional)
- `code` (Optional[str], optional)
- `challenge` (Optional[bool], optional)
- `wait` (Optional[int], optional)

## Returns

`Any`

## 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()
```
