SDK reference · Python SDK

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

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

Parameters

from_strRequired
tostrRequired
atOptional[str]
codeOptional[str]
challengeOptional[bool]
waitOptional[int]

Request fields

fromstringRequired
The caller ID, in E.164.
tostringRequired
The number that was called, in E.164.
attimestamp
When the call came in. Default now.
codestring
The caller's 6-digit short code. Needed when to isn't one of your verified lines.
challengeboolean
With nothing registered, issue an in-call challenge and ask the operator that verified from for proof.
waitinteger
Seconds to wait for proof after a challenge. Default 20.

Returns

Any The verdict.

HTTP operation

POST /v1/authorize/call_checks: Check an incoming call

Errors

Example

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.