Skip to main content
1

Get your credentials

Your client ID, client secret, and widget secret are provided by Tesouro during onboarding. To request access, have your designated team lead submit an access request.
2

Set up a widget token endpoint

Embedded components authenticate users via short-lived, user-scoped widget tokens. Your backend exposes an endpoint that receives { userId, userEmail } and returns { widgetToken }, encrypted using your TESOURO_WIDGET_SECRET.See the full implementation in the React integration guide.
3

Wrap your app and drop in a component

import { EmbeddedProvider, BalancesWidget } from '@tesouro/embedded-components-react';

export default function DashboardPage() {
  return (
    <EmbeddedProvider
      userId={currentUser.id}
      userEmail={currentUser.email}
      widgetTokenRefreshUrl="/api/widget-token"
    >
      <BalancesWidget />
    </EmbeddedProvider>
  );
}
Prefer a framework-agnostic approach? Use the web components option instead.

Next steps