View as Markdown

SDK reference · Python SDK

prov.account.get_text_consent

prov.account.get_text_consent in Python SDK. One consent record.

Signature

prov.account.get_text_consent(consent_id: str) -> Any

Parameters

consent_idstrRequired

Request fields

idstringpathRequired
The consent's id (tcon_…).

Returns

Any The record.

HTTP operation

GET /v1/account/text_consents/{id}: Retrieve a consent to text

Errors

Example

const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consent`, {
  method: "PUT",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({ "mode": "company", "everyone": null }),
})).json();
const step2 = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consents`, {
  method: "POST",
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5", "Content-Type": "application/json" },
  body: JSON.stringify({
    "phone": "+14155550134",
    "method": "in_person",
    "obtained_at": "2026-11-04T10:00:00Z"
  }),
})).json();
const consentId = step2.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consents/${consentId}`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();

Was this page helpful? Send us feedback

LLM? Read llms.txt.