Skip to main content
Use this page for the end-to-end embedded implementation path. For authentication pattern selection across embedded, standalone, and API auth, use Authentication. For field-by-field parameter definitions, use Configuration reference. For embed-runtime decisions, use Tenant embedding guide.

Integration handoff map

Tenant backend

Holds the Connected App secret, validates the tenant user session, and mints the short-lived Embed Token.

Tenant frontend

Loads the SDK script, renders the container, fetches the Embed Token, and hands it to the runtime.

Narrative SDK

Verifies the token exchange and boots the embedded product surface with tenant-scoped session state.

Prerequisites

Never mint Embed Tokens in frontend code. Keep the signing secret in your backend secret manager only.

When to use this page

This page is specific to embedded integration where a tenant backend issues the Embed Token and a tenant-owned frontend hosts the SDK runtime.
1

Load the SDK script

2

Render a container

3

Provide the Embed Token

Browser

What happens across the boundary

Integration checkpoints

Confirm that <NSDK_BASE_URL>/nsdk-loader.js loads successfully from the tenant frontend before debugging token or render issues.
The token route must run on the tenant backend, validate the current tenant user, and sign the token with the Connected App secret.
In declarative mode, the data-nsdk container must exist before the SDK runtime reads the token and boots the widget.
Only after the widget can boot cleanly should you move on to downstream auth and surface API validation.

Delivery checklist

Common errors and troubleshooting

Use same-origin route, proxy, or explicit CORS with credentials configuration.
Ensure token is signed with the Connected App secret matching iss.
Set aud exactly to nsdk-embed.
Use Unix seconds (not milliseconds) and keep server time synchronized.
Use Configuration reference for the detailed parameter table and Tenant embedding guide for runtime boot choices.
For the complete troubleshooting guide covering all common integration issues, see Troubleshooting. For common questions, see FAQ.