Ir para o conteúdo

HOST

Mint no host. Chat na página.

O navegador não vê SVEDA_EMBED_HOST_API_KEY. O backend chama POST /sveda/embed/token; a página abre chat JS ou iframe.

Mint no host. Chat na página.

O navegador não vê SVEDA_EMBED_HOST_API_KEY. O backend chama POST /sveda/embed/token; a página abre chat JS ou iframe.

SDKs por linguagem fazem mint de sveda_embed_ no host: PHP, Laravel, Python, Node, Ruby, Go, Java, .NET ou poucas linhas HTTP sem framework.

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