SDK reference · Node SDK

prov.authorize.calls.relayCode

prov.authorize.calls.relayCode in Node SDK. The last resort: a code and a short address the caller relays to its person.

Signature

prov.authorize.calls.relayCode(id: string): Promise<CallRelayCode>

Parameters

idstringRequired

Request fields

idstringpathRequired
The check's ID (ccx_).

Returns

Promise<CallRelayCode> The code and the address.

HTTP operation

POST /v1/authorize/call_checks/{id}/relay_codes: Issue a relayed code

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "from": "+14155550178", "to": "+14155550123", "code": "123456" }),
})).json();
const checkId = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/call_checks/${checkId}/relay_codes`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.