Components
Kind: element (inline) · Session key: approvalButton · React: <FinBazeApprovalButton />
Create the session#
mutation {
createEmbedSession(input: {
companyId: "…"
user: { externalUserId: "…" }
components: { approvalButton: { enabled: true } }
}) { clientSecret }
}
Requirements#
The company must have these features effective: ai.agents. A hidden feature makes createEmbedSession fail with FEATURE_DISABLED.
Component features#
None.
Options#
Passed to instance.create("approval-button", options) or as props.
| Option | Type | |
|---|---|---|
approvalId | string | The agent approval to decide. |
Every component also takes appearance and navigation ("internal" or "external").
Events#
| Event | React prop |
|---|---|
ready | onReady |
navigate | onNavigate |
error | onError |
approved | onApproved |
rejected | onRejected |
Use it#
import { FinBazeApprovalButton } from "@finbaze/embed-react";
<FinBazeApprovalButton />
const component = instance.create("approval-button");
component.mount("#finbaze");