View as Markdown

SDK reference · Node SDK

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

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

Parameters

imageUint8Array | BlobRequired
contentType"image/png" | "image/jpeg"Required

Returns

Promise<TextConsentScreenshot> The screenshot's record.

HTTP operation

POST /v1/account/text_consent/screenshots: Add an opt-in screenshot

Errors

Example

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();

Was this page helpful? Send us feedback

LLM? Read llms.txt.