Help us improve
Share bugs, ideas, or general feedback.
From stackone-connect
Implement account linking using StackOne Connect Sessions and the Hub React component. Use when user asks to "connect a provider", "embed the integration picker", "add BambooHR to my app", "create a connect session", "set up auth links", or "handle account webhooks". Covers the full flow from session creation to webhook handling. Do NOT use for making API calls after linking (use stackone-platform) or building AI agents (use stackone-agents).
npx claudepluginhub stackonehq/agent-plugins --plugin stackone-connectHow this skill is triggered — by the user, by Claude, or both
Slash command
/stackone-connect:stackone-connectThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Before writing code, fetch the latest documentation:
Installs Pi-hole via Docker or bare-metal, manages blocklists, configures DNS-over-HTTPS, sets local DNS records, and troubleshoots broken DNS on a home network.
Share bugs, ideas, or general feedback.
Before writing code, fetch the latest documentation:
https://docs.stackone.com/guides/connect-tools-overview for the current connection flowhttps://www.npmjs.com/package/@stackone/hub for the latest Hub component APIThe Hub component is in active beta — props and peer dependencies change between versions.
| Method | When to use |
|---|---|
| Embedded Hub | In-app integration picker — users stay in your app |
| Auth Link | Email onboarding or external flows — standalone URL, valid 5 days |
| Dashboard | Internal testing only — never for production |
If unsure, recommend the Embedded Hub. It provides the best user experience.
Your backend creates a session token that the frontend uses to initialize the Hub:
curl -X POST https://api.stackone.com/connect_sessions \
-H "Authorization: Basic $(echo -n 'YOUR_API_KEY:' | base64)" \
-H "Content-Type: application/json" \
-d '{
"origin_owner_id": "customer-123",
"origin_owner_name": "Acme Inc"
}'
The response includes a token field. Pass this to the frontend.
To filter which providers appear in the Hub:
{
"origin_owner_id": "customer-123",
"origin_owner_name": "Acme Inc",
"provider": "bamboohr",
"categories": ["hris"]
}
Fetch https://docs.stackone.com/platform/api-reference/connect-sessions/create-connect-session for the full request/response schema.
npm install @stackone/hub
import { StackOneHub } from "@stackone/hub";
function ConnectorPage() {
const [token, setToken] = useState<string>();
useEffect(() => {
fetchConnectSessionToken().then(setToken);
}, []);
if (!token) return <div>Loading...</div>;
return (
<StackOneHub
token={token}
onSuccess={(account) => {
// Store account.id — you'll need it for all subsequent API calls
console.log("Connected:", account.id, account.provider);
}}
onCancel={() => console.log("User cancelled")}
onClose={() => console.log("Hub closed")}
/>
);
}
For the full props API and theming options, consult references/hub-reference.md.
Webhooks are required for Auth Links (no frontend callbacks) and recommended for the Embedded Hub:
| Event | When it fires |
|---|---|
account.created | New account linked |
account.updated | Credentials refreshed |
account.deleted | Account disconnected |
Fetch https://docs.stackone.com/guides/webhooks for the webhook payload format and setup instructions.
After receiving onSuccess or the account.created webhook, make a test API call:
curl https://api.stackone.com/accounts/{account_id} \
-H "Authorization: Basic $(echo -n 'YOUR_API_KEY:' | base64)"
A 200 response with status: "active" confirms the connection is working.
User says: "I want to let my customers connect their BambooHR account"
Actions:
POST /connect_sessions with provider: "bamboohr"@stackone/hub and render <StackOneHub token={token} />onSuccess to store the account IDaccount.created as a backupResult: Working integration picker that filters to BambooHR only.
User says: "I need to onboard customers by email, not in-app"
Actions:
origin_owner_id set to the customerResult: Customer clicks link, authenticates, webhook fires with account details.
Cause: Missing peer dependencies.
@stackone/hub requires: react, react-dom, react-hook-form, @hookform/resolvers, zodCause: Tokens are short-lived.
Cause: Provider-side authentication succeeded but StackOne couldn't sync data.
Cause: Webhook endpoint configuration issue.
https://docs.stackone.com/guides/webhooks for the verification process