# prov.account.listTextConsents

prov.account.listTextConsents in Node SDK. Your consent records, newest first; `phone` looks one phone up by its full number.

## Signature

```ts
prov.account.listTextConsents(params?: { phone?: string; status?: "active" | "withdrawn"; source?: TextConsent["source"]; limit?: number; cursor?: string }): Promise<ListResponse<TextConsent>>
```

## Parameters

- `params` ({ phone?: string; status?: "active" | "withdrawn"; source?: TextConsent["source"]; limit?: number; cursor?: string }, optional)

## Returns

`Promise<ListResponse<TextConsent>>`

## HTTP operation

[`GET /v1/account/text_consents`](https://provenanceauth.com/docs/api/account.md#get-v1-account-text-consents): List consents to text

## Errors

- [`authentication_required`](https://provenanceauth.com/docs/platform/errors.md#authentication_required)
- [`parameter_invalid`](https://provenanceauth.com/docs/platform/errors.md#parameter_invalid)
- [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded)
- [`text_consents_unavailable`](https://provenanceauth.com/docs/platform/errors.md#text_consents_unavailable)

## Example

**Node**

```ts
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": "+14155550133",
    "method": "in_app",
    "obtained_at": "2026-11-03T10:00:00Z"
  }),
})).json();
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consents`, {
  headers: { Authorization: "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5" },
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
step1 = httpx.put(f"{api}/v1/account/text_consent", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "mode": "company",
    "everyone": None
}).json()
step2 = httpx.post(f"{api}/v1/account/text_consents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}, json={
    "phone": "+14155550133",
    "method": "in_app",
    "obtained_at": "2026-11-03T10:00:00Z"
}).json()
data = httpx.get(f"{api}/v1/account/text_consents", headers={"Authorization": "Bearer prv_test_acct_P9xN2vQ7bT4mW8sYd3cFjLh6gAe1kR5"}).json()
```
