Skip to main content
The StackOne Hub (@stackone/hub) is a native React <StackOneHub> component that renders directly in your React tree. It offers filtering, search, detailed error messages, and full theming support. It is the recommended way to implement the Hub.

Quick start

1

Install the package

2

Get a session token from your backend

The Hub needs a connect session token to securely communicate with StackOne. This token must be generated server-side to keep your API key secure.
To route the session through a specific connector profile (when a provider has more than one), pass its connector_profile_id when creating the session — see Target a specific connector profile.
3

Add the component

4

Let users link their accounts

Your end-users now use the Hub to connect their accounts. Each successful link fires onSuccess with the linked account id — persist against your user — it’s the account ID you’ll use with every action call.You can also capture it server-side from the account.created webhook event.

Properties

The StackOneHub component accepts these properties:
Use onSuccess to update your UI or trigger backend syncs. Use onClose as a cleanup handler that always runs.

Theming

The Hub supports full theming with the theme property:
For custom theming, pass a PartialMalachiteTheme object:
See the @stackone/hub repository for full theme options.
For non-React stacks, use the web components build (<stackone-hub>). For the older hook API, see @stackone/react-hub on npm.

Next steps

Call Actions

With the account linked, call its actions from your product — over the Agent SDK, MCP, A2A, or RPC/HTTP.

Embed Overview

Return to the end-to-end embedding journey.