Skip to content
AskTable

Documentation feedback

Current pageWeb embedding/en/integrations/embed

0 / 5,000

Your feedback will be sent to the maintenance team.

Go to console
Go to console

Configuration and administration

Embed a data question window in a webpage

Embed a data question window in business pages and control visitors' data permissions through a bound role.

Guide · Module: integrations · Developers · Deployment: Not specified · Confirmed product versions: Not specified · Source: Existing documentation

Embedding turns a data Agent into a public URL you can place in your own page using an iframe. Visitors do not log in to AskTable or select data sources or roles. Each URL binds to one fixed role, and all visitors ask questions within that role's data scope.

WeCom and WPS here are only host pages for the iframe, not AskTable messaging channels or WeCom/WPS login. Those login methods use WeCom and WPS identity integration.

Before you begin

  • Permissions: your project role must be “Project owner” or “Project administrator.”
  • Prerequisite: a configured data Agent; see Create and configure a data Agent.
  • Choose a role first: its data scope is exposed to all visitors. Confirm it is suitable for external access before binding.
  • Host page: its HTML must be editable so you can add an <iframe>.
  • Entry: left main navigation → “More” → open target Agent → top “Embed” tab.

Steps

Create an embed URL

The “Embed” tab has an “Embed URLs” section, explaining that it creates embeddable URLs for placing this Agent on external sites via iframe. An empty list shows No embed URLs and suggests creating one to embed the Agent on an external site. Click “New URL” to open the creation dialog.

Enter a name and role

  • Name is required, with a placeholder such as Official website embed, and supports up to 255 characters.
  • Role is required; choose an existing role from the dropdown. If it has required variables, the dialog requires their values before submission; the variables apply identically to all visitors.

All visitors share this role and see the same data boundaries. To isolate data by visitor identity, use Feishu or Slack channels with person authorization, or enterprise identity login.

Choose whether to enable trusted domains

The form has a Trusted domains switch, off by default. When off, the explanation says any website can embed this URL without origin domain checks, so any site can embed the iframe.

Enabling it reveals an Allowed domains input with a placeholder such as example.com or *.example.com. Enter the domain of the outer embedding site (the page containing the iframe), not AskTable's own domain. Enter domains without http:// or https://; *.example.com covers all subdomains. Enabling checks with an empty allowlist blocks all sites, so enter at least one domain.

Save and copy the embed code

Click “Save”; success shows Created successfully. New URLs are enabled immediately, and the status on the right of the list entry says Enabled.

Use “Copy embed code” in the entry's “More” menu on the right; successful copying shows a message. Paste the code into the host page:

<iframe src="https://<your-AskTable-site>/embed/emb_xxxx" referrerpolicy="strict-origin-when-cross-origin" style="width:100%;height:600px;border:0" />

Do not remove referrerpolicy. Firefox cannot read the iframe's parent-page origin and relies on this fallback. If it is removed and the host page also sets global no-referrer, trusted-domain checks return 403 directly.

Check the list entry's status

Each entry shows its name, role badge, domain badge (domain count when checks are enabled, Any domain otherwise), usage statistics (active conversations over the last 7 days), and latest activity time (No conversations if none exist). The far right has status text and a switch.

Turning the switch off changes the status to Disabled and disconnects ongoing visitor conversations immediately. After re-enabling it, visitors can refresh to continue.

Verify with a real host domain

Verify at least four things: an allowed origin opens the page and completes a question; an origin outside the allowlist is rejected; follow-up questions stay within the bound role's scope; and disabling the URL disconnects existing conversations.

Key constraints

ItemValue or defaultWhere to change it
NameRequired, up to 255 charactersAgent → “Embed” → “New URL”
RoleRequired; one role per URLAgent → “Embed” → “New URL”
Trusted domainsOff by default (no origin checks)Agent → “Embed” → “New URL”
Allowed domainsAvailable only when enabled; stores bare hostnames and supports *.example.comAgent → “Embed” → “New URL”
Enabled stateEnabled on creationSwitch on the right of the “Embed” list entry
Visitor conversation token validity24 hoursNo UI switch
Visitor page fast modeOn initially for a new conversation (fast answers); visitors can turn it off for longer reasoningToolbar below the visitor page input
When a tightened allowlist takes effectAt latest on the next token renewal or after 24-hour expirationNo UI switch

Troubleshooting

SymptomIdentifying conditionResolution
Visitor page says this embed is temporarily unavailableRequest returns EMBED_DISABLED (HTTP 403) and URL switch is DisabledEnable the switch in the Agent's “Embed” list
Visitor page says origin is not allowedRequest returns EMBED_ORIGIN_NOT_ALLOWED (HTTP 403)Add the host page domain to Allowed domains; confirm iframe referrerpolicy was not removed
Visitor page says resource not foundRequest returns RESOURCE_NOT_FOUND (HTTP 404)URL was deleted or the iframe's emb_ identifier is incorrect
No “New conversation” button on visitor pageError is EMBED_DISABLED, EMBED_ORIGIN_NOT_ALLOWED, or RESOURCE_NOT_FOUNDNew conversations fail for these same three reasons; resolve using the corresponding rows above
An old page still opens after allowlist changesVisitor's conversation token has not expiredWait for token renewal or 24-hour expiration; disable the URL first in an emergency
Visitor can query only some dataThe bound role defines that data scopeChange the role or adjust scope in “Roles”
Visitor wants to resume a previous conversation, but refreshing starts overMore than 24 hours have passed and the token expiredExpected behavior; refreshing within 24 hours in the same browser resumes the conversation

Next steps