SDK reference · Python SDK

prov.account.test_text

prov.account.test_text in Python SDK. One recorded test text, with its body as it would have been sent.

Signature

prov.account.test_text(text_id: str) -> Any

Parameters

text_idstrRequired

Request fields

idstringpathRequired
The recorded text's id (ttxt_…).

Returns

Any The recorded text.

HTTP operation

GET /v1/account/test_texts/{id}: Get a test text

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/attest/capture_requests`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x", "Content-Type": "application/json" },
  body: JSON.stringify({
    "case_id": "CLM-TEST-TEXT-2",
    "session_type": "id",
    "contact": {
      "phone": "+12025550101"
    }
  }),
})).json();
const ttRequest2 = step1.id;
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/test_texts?request_id=${ttRequest2}`, {
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();
const ttId = step2.data[0].id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/test_texts/${ttId}`, {
  headers: { Authorization: "Bearer prv_test_capture_C4pT9vQ2bW7mK3sYd8cFjLh6gAe1nR5x" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.