Overview
Once the widget script has loaded, it exposes a small API onwindow.CallKaro.
Use it to open the widget from your own buttons, close it programmatically, and
run your own code when a conversation starts or ends.
Nothing here is required. If you only want the launcher in the corner, the
snippet on its own is enough.
Waiting For The Widget
The snippet usesdefer, so window.CallKaro does not exist while your
page is still parsing. Any code that touches it must wait.
The simplest reliable approach is to check inside the handler that needs it,
because by the time a visitor clicks something the widget has long since loaded:
Methods
CallKaro.open()
Opens the conversation panel and hides the launcher. Does nothing if the panel is already open. Use it to trigger the widget from your own call-to-action:Opening the panel does not start a conversation. The visitor still presses
Talk and grants microphone permission themselves.
CallKaro.close()
Closes the panel and restores the launcher. Does nothing if it is already closed.CallKaro.on(event, callback)
Registers a listener. ReturnsCallKaro, so calls can be chained:
An error thrown inside your callback is caught and logged to the console — it
will not break the widget.
CallKaro.widgetId
The widget id read from your script tag. Useful when the same analytics code runs on pages carrying different widgets.Events
ready fires after the panel is opened for the first time, not on page load —
the panel is only loaded when somebody opens it.Examples
Track engagement in your analytics
Measure how long conversations last
Hide your own chat bubble while the widget is open
React
Limitations
Worth knowing before you build on this:- Listeners cannot be removed. There is no
off()method. - No way to start a conversation from code.
open()shows the panel; the visitor presses Talk. This is deliberate — browsers require a user gesture before granting microphone access. - No transcript access. The conversation text is not exposed to the host page. Read transcripts in Call History instead.
- One widget per page. A second snippet on the same page is ignored, and
CallKaroalways refers to the first.
Need something else?
Tell us what you are trying to build and we will see what we can expose