ScenaroSession is the framework-agnostic core of the SDK. useScenaroSession is a thin
React binding over it — if you’re not using React (vanilla JS, Vue, Svelte…), use this class
directly.
Constructor
Throws if neither
client nor apiUrl is provided.
State
All state is readable synchronously; changes are announced through events.Methods
start
ScenaroError with code IDENTIFY_FAILED or SESSION_START_FAILED.
StartSessionOptions
end
status to 'ended'. The session
can be started again with start().
sendText / setMicrophoneEnabled
error event instead, so
fire-and-forget call sites don’t produce unhandled rejections.
destroy
ScenaroProvider does this automatically on unmount).
Events
Kebab-case event names, subscribed withon / off:
Errors
start() throws; everything after connection emits on error instead.
SessionConfig
A curated view of the scenario config — backend plumbing (company_id, voice_stack,
timestamps, tool wiring) is deliberately not exposed.