On this page

#Identity flows

A known visitor is a JWT signed with your private key, verified by Vatio with your public key, and forwarded to your API as $auth.token when a private tool runs. It reaches Vatio on the web, where your page renders it onto the widget, and on WhatsApp and Instagram, where the contact brings it back from your sign-in page (On WhatsApp and Instagram).

The diagram below is Mermaid so that they read the same in a browser, in the Markdown twin of this page and to a coding agent.

#Keys and credentials

CredentialSigned byVerified byLivesUsed on
Identity JWT ($auth.token)Your private key, in your backendVatio, with the public key you gave set_authThe exp you chooseWeb, WhatsApp, Instagram
Publishable key (vatpub_…)Issued by VatioVatio; it works from any origin (Publishable keys)Until revokedWeb
chat_tokenVatioVatio12 hoursWeb

$auth.token is always the identity JWT. The publishable key names the workspace, not the person, and never reaches your backend.

#Web

sequenceDiagram
autonumber
participant B as Your backend
participant W as Widget / SDK
participant V as Vatio
participant A as Your API
B->>W: page with data-token=vatpub_… and data-visitor-token=JWT
W->>V: POST /api/visitor/v1/:ws/chats (Bearer vatpub_, visitor_token)
V->>V: rate limit, verify JWT with your public key
V->>V: store the JWT, write name/email/phone_number onto the contact
V-->>W: chat_token (12 h)
W->>V: messages (Bearer chat_token)
V->>V: private tool: verify the stored JWT again (exp)
V->>A: Authorization: Bearer $auth.token
A->>A: verify with your key
  • A visitor who signs in mid-conversation: the page calls VatioWidget.identify(jwt), and the SDK posts it to /api/visitor/v1/:ws/chats/:id/identify.
  • A JWT with a different sub answers identity_changed, and the SDK starts a new conversation. One person never sees another's.
  • No JWT means an anonymous chat. Private tools answer that they could not confirm who the visitor is.
  • Vatio never mints a token: your backend signs it. See On the web.

#Where to go next

Last updated:

Latest release: 0.144.0 · Changelog · The whole contract as Markdown: /docs/docs.md