Skip to content

HOST

Mint on the host. Open the chat from the page.

The browser never holds SVEDA_EMBED_HOST_API_KEY. Your backend calls POST /sveda/embed/token, then the page opens JS chat or an iframe.

POST /sveda/session

host route

sveda_embed_

token prefix

9

language guides

The problem

A widget that mints tokens in the browser ships your host key. A Vue-only kit leaves PHP and Go hosts rewriting the handshake. The mint belongs on the server, in the language you already run.

Key in the page

SVEDA_EMBED_HOST_API_KEY stays on the sidecar and the host process. The page only receives origin + token.

One handshake

Every SDK returns origin, token, expires_in, appearance. sveda-host.js does not care which backend minted it.

Framework optional

Laravel, Django, Nest, Rails, Spring, ASP.NET are wrappers. PHP, Go, and a static page plus curl still work.

How to connect

Same five steps on every host. The language pages only change the install line and the mint helper.

  1. 1

    Run sveda-server

    Enable embed, set a host API key, and list the page origin in CORS.

  2. 2

    Install or skip

    Language SDK if you have a backend. No framework if you only need HTML plus a tiny POST.

  3. 3

    Match keys

    Host SVEDA_CLIENT_HOST_API_KEY equals sidecar SVEDA_EMBED_HOST_API_KEY.

  4. 4

    Mint on POST

    Expose POST /sveda/session. Return origin, token, expires_in.

  5. 5

    Open chat

    Page buttons data-sveda-open for JS or iframe.

Pick a language

Step-by-step install for each stack, plus a no-framework path.

Related

Pick a host.

Nine step-by-step guides. Same session JSON. Same two chat openers.

Host SDK docs