Appearance
JavaScript API
The bundle exposes a single global function Inviaro(method, ...args).
Hosted endpoints
| URL | Content |
|---|---|
https://widget.inviaro.com/v1.js | The widget bundle. Mutable, 5 min cache. Embed this in your page. |
https://widget.inviaro.com/embed | The embed page for mobile WebViews and dedicated chat surfaces. |
https://widget.inviaro.com/manifest.json | Build manifest with version + SHA-384 integrity hash. |
All endpoints serve Access-Control-Allow-Origin: * and HTTPS-only.
Calling pattern
js
Inviaro('show');
Inviaro('identify', { userId: 'usr_42', userHash: '...', email: '...' });
Inviaro('consent', false);Calls made before the bundle finishes loading are queued and replayed on init.
Methods
show
Open the chat panel.
js
Inviaro('show');hide
Close the chat panel. Polling continues in the background. Unread messages still increment the launcher badge.
js
Inviaro('hide');identify
Update visitor identity. Use after the visitor logs in or to refresh the signed userHash.
js
Inviaro('identify', {
userId: 'usr_42',
userHash: 'a1b2c3...',
email: 'amar@example.com',
name: 'Amar'
});| Field | Required | Notes |
|---|---|---|
userId | yes | Stable user id from your auth system. |
userHash | for verification | Server-signed digest. Without it, userId is not trusted. |
email | no | Used as fallback when no pre-chat form. |
name | no | Visitor display name. |
See Identity verification for the full contract.
logout
Clear stored session, profile, and identity claims.
js
Inviaro('logout');consent
Set the consent flag at runtime.
js
Inviaro('consent', true);
Inviaro('consent', false);false purges stored data and demotes to memory-only mode. See Privacy and consent.
Diagnostics
Two read-only globals for support tickets:
| Global | Type | Purpose |
|---|---|---|
window.__INVIARO_VERSION__ | string | Bundle version. |
window.__INVIARO_API_BASE__ | string | Configured API base URL. |
Error reporting
The bundle logs errors to the browser console with an [Inviaro] prefix. Common patterns:
[Inviaro] settings.key missing. Setwindow.InviaroSettings.keybefore the bundle's script tag.[Inviaro] settings.origin missing. Same, fororigin.[Inviaro] launcher mount point missing. The bundle ran twice. Verify the script tag is not duplicated.
The visitor never sees these. Production builds strip console output.