Skip to main content
Headless exposes the full engine and renders nothing. You build every screen and react to every state. Choose it only when you need that control — the bundled UIs already handle sign-in, caller ID selection, keypad, call controls and error copy.

Create an instance

initialize() may resolve authenticated or anonymous:
  • a valid session in sessionStorage is restored, emitting signedIn and ready;
  • otherwise it emits authRequired and waits for the OTP flow.

Email one-time code

Resend:
Use challenge.resendAvailableAt to gate the resend button and challenge.expiresAt to show a countdown.
Ringee does not reveal whether an email exists. A code is “sent” for any well-formed address — do not build enumeration hints into your UI.

Place and control a call

Only one call can be active per instance or agent. The SDK uses Web Locks to prevent a second tab from starting one, and the server validates the restriction again.

Caller IDs

Returns the caller IDs the authenticated agent may use. Render them as a selector and pass the chosen callerIdId to call(). Omit it to let Ringee choose.

Audio devices

Output selection depends on browser support. deviceChanged fires when the selection changes.

Read current state

Full lists: call states and auth states.

Unsubscribe

Every on() returns an unsubscribe function:

Sign out and clean up

These are different operations. Destroying an instance does not sign the agent out; signing out does not release WebRTC.

Building a good headless UI

The exact sequence varies with the browser, the network and the remote destination. Render from the current state rather than from an expected transition order.
The bundled UIs turn backend error codes into actionable messages. Headless gives you raw RingeeError codes — map them to copy your users understand. See Errors.
Start calls from a click. Browsers block audio playback that was not user-initiated.
reconnecting is a normal transient state on flaky networks. Show it, but do not tear the call down.

Next steps

API reference

Every method, event and state

Errors

Every error code and how to react