Skip to content

Sandbox

Use this page to understand the integration surface and experiment with embed parameters.

Tip

For a guided experience with a live preview, use Widget Studio.

What to test

  • Tenant slug resolves and /widget/v1/<tenant>/config.json returns tenant config.
  • Your frontend origin is registered for the tenant.
  • Your backend token endpoint returns { "token": "..." }.
  • /sso-login/ accepts the token and redirects to the expected target.
  • Anonymous SSO sets guest mode when is_anonymous is true or identity is missing.
  • Known-user SSO sets a non-anonymous SILENT session when valid identity is present.

Local and environment URLs

Environment CDN script origin Typical app/SSO origin
Local http://cdn.localhost:8000 http://app.localhost:8000 or tenant demo host
Development https://dev.cdn.traveln.ai matching dev tenant host
Production https://cdn.traveln.ai matching production tenant host

Use the same environment for the CDN script, tenant config, token endpoint, and SSO URL.

Manual smoke checks

Trip Planner Widget

  1. Load a page containing traveln-widget.js.
  2. Confirm the iframe renders.
  3. Submit a prompt.
  4. Confirm your token endpoint receives { "prompt": "...", "trace_id": "..." }.
  5. Confirm the browser redirects to /sso-login/?token=...&prompt=....
  6. Confirm Traveln opens the AI trip planner.

SSO Button Widget

  1. Load a page containing traveln-button.js.
  2. Confirm the button iframe sizes itself and becomes visible.
  3. Click the button.
  4. Confirm your token endpoint receives { "trace_id": "..." }.
  5. Confirm Traveln opens the target selected by data-button-type.

Headless SDK

  1. Load traveln-sdk.js.
  2. Call Traveln.init(...).
  3. Trigger Traveln.startPlanner, Traveln.openTrips, or Traveln.startAccommodationSearch.
  4. Confirm the SDK requests a token and redirects through SSO.