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.jsonreturns 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_anonymousis true or identity is missing. - Known-user SSO sets a non-anonymous
SILENTsession 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¶
- Load a page containing
traveln-widget.js. - Confirm the iframe renders.
- Submit a prompt.
- Confirm your token endpoint receives
{ "prompt": "...", "trace_id": "..." }. - Confirm the browser redirects to
/sso-login/?token=...&prompt=.... - Confirm Traveln opens the AI trip planner.
SSO Button Widget¶
- Load a page containing
traveln-button.js. - Confirm the button iframe sizes itself and becomes visible.
- Click the button.
- Confirm your token endpoint receives
{ "trace_id": "..." }. - Confirm Traveln opens the target selected by
data-button-type.
Headless SDK¶
- Load
traveln-sdk.js. - Call
Traveln.init(...). - Trigger
Traveln.startPlanner,Traveln.openTrips, orTraveln.startAccommodationSearch. - Confirm the SDK requests a token and redirects through SSO.