A conversation.
Inside your product.
Mount TableArth alongside a report or table. Authenticate the visitor with your server-issued SSO token, then render the widget for the selected data.
1. Prepare the integration
Your administrator configures an active agent, supported AI model, allowed origins, and the tenant SSO settings. Obtain the widget ID and deployment-specific asset URLs. The bundle handles its own signed requests; you do not put an API key or SSO signing secret in browser code.
2. Load the bundle and mount element
Use the versioned CSS and JavaScript URLs supplied for your deployment. These placeholders are not public CDN addresses.
<link href="https://YOUR_WIDGET_HOST/app.HASH.css" rel="stylesheet">
<script src="https://YOUR_WIDGET_HOST/app.HASH.js"></script>
<div class="antrika-table-ai-widget"
data-id="YOUR_WIDGET_ID"
data-report-name="Sales overview"></div>
3. Establish the visitor session
Your server signs a short-lived HS256 JWT with the tenant’s SSO signing key. The required identity claims use
id
, not
sub
. Include at least one company entry.
{
"id": "user-id-in-your-product",
"name": "Visitor Name",
"email": "visitor@example.com",
"companies": [{ "id": "account-123", "name": "Example account" }],
"iat": 0,
"exp": 0
}
The timestamps above are placeholders. Set real issue and expiry times on your server and use a short lifetime. Never ship the signing key to the page.
4. Mount after authentication
Call
syncUser
, then mount in its callback. The widget uses the resulting SSO session. There is no
ssoToken
option on
renderTableAI
.
// Supply mintedJwt from your authenticated server.
window.antrika('syncUser', {
customerId: 'YOUR_TENANT_ID',
token: mintedJwt
}, function () {
window.antrika('renderTableAI', {
widgetId: 'YOUR_WIDGET_ID',
remoteSessionId: 'report:sales:account-123:2026-09',
reportName: 'Sales overview',
csvFile: 'Region,Revenue\nNorth,12000\nSouth,9000',
theme: 'LIGHT'
});
});
The
widgetId
must match the mount element’s
data-id
. The CSV is illustrative; supply the authorized report data from your application.
5. Keep sessions meaningful
Provide a stable
remoteSessionId
for the account, report, and relevant data version. When data or filters change meaningfully, use a new session key. If no explicit key is supplied,
csvFile
can be used to derive one from the data.
Refresh the visitor identity by minting a fresh JWT on your server and calling
syncUser
again. Development tenants use the supported
syncUserLocal
flow.
Before you ship
- Verify the CSS and script bundle URLs belong to your deployment.
- Mount only after the SSO callback succeeds.
- Configure allowed origins and verify account-specific access.
- Test empty tables, changed datasets, expired identity, and rejected requests.
- Check the full AI data path and privacy settings for your source.
For a custom server-side integration, use the REST API guide .
Before you get started.
What is required before rendering the widget?
Configure the tenant and mint the user identity token on your server. Load the widget, call syncUser with the authorized identity, and then call renderTableAI with the supported configuration and selected data.
Where should I keep widget signing keys?
Keep signing keys on your server. The browser receives only the appropriate token and public widget configuration. Validate identity, data selection, and access controls before exposing the widget to customers.
Your data. Your questions. More possibilities.
Connect a source, explore twelve dashboard examples, and see how an AI native workspace fits the way your team works.