Web calls
Let a visitor talk to one of your agents from your own web page, without your API key ever reaching the browser.
A web call is a voice conversation between a visitor and one of your agents, started from a page on your website. The visitor allows their microphone, speaks, and hears the agent. You build the page; Dialgem runs the call, records it, and puts it in your call list with call_type: "web_call".
Use web calls for a "Talk to us" button, a voice demo, an in-app assistant or a support widget. There is no phone number or carrier in the path, so they are the quickest way to try an agent, and the telephony line is free on them (see Billing and pricing).
Two packages do the work: @dialgem/sdk on your server and @dialgem/client in the browser.
How a call starts
The visitor clicks your button
For example "Talk to us". Browsers only allow sound after a click or tap, so the call must start from one.
Your page asks your server for a call
Your server is the only place your API key lives.
Your server creates the call
It calls POST /v1/calls/web with the key and gets back a call_id and a one-use access_token.
Your server hands the token to the page
The token is not the API key. It works for one call, with one agent, once, for 60 seconds.
The page opens the call
@dialgem/client connects with that token and nothing else. The visitor and the agent talk.
Your API key stays on your server. The organization, the agent and the allowed websites are all fixed inside the token when your server creates it, so the page cannot pick different ones.
What you build
| Where | What | Package |
|---|---|---|
| Your server | One endpoint that creates a call and returns the token. | @dialgem/sdk or dialgem (Python) |
| Your page | A button, a transcript area and call state. | @dialgem/client |
| Dashboard | The list of websites allowed to start calls. | None |
Guides
A working server endpoint and page in plain JavaScript and React, from empty project to first call.
How tokens work, how the website allow-list protects them, and the limits that apply.
Fill the prompt with the visitor's name, tag the call, pick an agent version and read the result afterwards.
Every error the page can receive, what causes it and how to fix it.
DialgemCall, events, microphone options and the React hook.
Requirements
Chrome 66+, Edge 79+, Firefox 76+ or Safari 14.1+, on a page served over HTTPS (or localhost). A web call is billed like any other call, so the organization needs credit.