SDK reference · Node SDK

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

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

Parameters

paramsCallCheckParamsRequired

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

Promise<CallCheck> 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.