> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Accept Disclosures

> Embed the accept disclosures component to let invited team members, and active users who need to accept a newly published version, review and accept required banking disclosures.

The accept disclosures component renders an inline card with links to the bank's disclosure documents, an agreement checkbox, and an Accept action. The banking partner defines the order and titles of the documents — you don't pass in any document URLs yourself.

Mount it in two situations: an invited team member who hasn't yet accepted the bank's disclosures, and an already-active user who needs to accept a newly published version. Accepting activates an invited user and records their acceptance in a single step, so a failure partway through can't leave an active user with no acceptance on record.

<Note>
  Show this component when the widget init response reports `status: "INVITED"`, **or**
  `disclosuresRequired: "REQUIRED"` with `disclosuresAccepted: false`. The first case covers an
  invited teammate even in an organization whose requirement is `NOT_REQUIRED` — Accept still needs
  to run once (posting a `null` version) to activate them, so gating on `disclosuresRequired ===
      "REQUIRED"` alone would leave those invitees stuck. The second case covers an already-active user
  who needs to accept a newly published version. Once the user accepts, the component refreshes
  automatically, so the rest of your UI picks up their new status with no extra step on your end.
</Note>

## React

```tsx lines theme={null}
import {
  EmbeddedProvider,
  AcceptDisclosuresWidget,
  useWidgetConfig,
} from "@tesouro/embedded-components-react";

function DisclosuresGate() {
  const { initResponse } = useWidgetConfig();
  const isInvitee = initResponse?.status === "INVITED";
  const owesReacceptance =
    initResponse?.disclosuresRequired === "REQUIRED" && !initResponse.disclosuresAccepted;

  if (!isInvitee && !owesReacceptance) return null;

  return <AcceptDisclosuresWidget onAccepted={() => router.push("/banking/dashboard")} />;
}

export default function AcceptInvitePage({ invitedUser }) {
  return (
    <EmbeddedProvider
      userId={invitedUser.id}
      userEmail={invitedUser.email}
      widgetTokenRefreshUrl="/api/widget-token"
    >
      <DisclosuresGate />
    </EmbeddedProvider>
  );
}
```

The component identifies the caller from the widget token alone — it doesn't take an invitation token or user id prop, and it doesn't read anything from the URL. Mount `EmbeddedProvider` with the invited (or reauthorizing) user's own `userId`/`userEmail`, the same way you would for any other embedded component.

### AcceptDisclosuresWidget props

| Prop         | Required | Description                                                                                                                   |
| :----------- | :------- | :---------------------------------------------------------------------------------------------------------------------------- |
| `onAccepted` | No       | Called after acceptance is recorded, and awaited before the component locks. Use it to navigate the user into your dashboard. |
| `labels`     | No       | Override the title, Accept button, link labels, and agreement/attribution copy                                                |

## Web components

<Note>
  `AcceptDisclosuresWidget` is currently available for React only. A web component equivalent has
  not been published yet.
</Note>
