# prov.account.addTextConsentScreenshot

prov.account.addTextConsentScreenshot in Node SDK. Slice 6: under We have it, a screenshot (PNG or JPEG, up to 5 MB) of how people agree to your texts; up to five.

## Signature

```ts
prov.account.addTextConsentScreenshot(image: Uint8Array | Blob, contentType: "image/png" | "image/jpeg"): Promise<TextConsentScreenshot>
```

## Parameters

- `image` (Uint8Array | Blob)
- `contentType` ("image/png" | "image/jpeg")

## Returns

`Promise<TextConsentScreenshot>`

## HTTP operation

[`POST /v1/account/text_consent/screenshots`](https://provenanceauth.com/docs/api/account.md#post-v1-account-text-consent-screenshots): Add an opt-in screenshot

## Errors

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

## Example

**Node**

```ts
import { readFile } from "node:fs/promises";

const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/account/text_consent/screenshots`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.PROVENANCE_KEY}`, "Content-Type": "image/png" },
  body: await readFile("signup-form.png"),
})).json();
```

**Python**

```python
import os
import httpx

api = os.environ["PROVENANCE_API"]
with open("signup-form.png", "rb") as f:
    data = httpx.post(
        f"{api}/v1/account/text_consent/screenshots",
        headers={"Authorization": f"Bearer {os.environ['PROVENANCE_KEY']}", "Content-Type": "image/png"},
        content=f.read(),
    ).json()
```
