Skip to main content

IClientOptions

Options passed to the TelnyxRTC constructor to configure the client.

Quick Reference


Authentication

Choose one authentication method. See Authentication for the full guide.
Use login_token (JWT) for production applications. Credentials (login + password) are long-lived with no automatic rotation. JWTs expire after 24 hours and support refresh. See Authenticating Your App.
JWT (production):
Credential (development only):

Anonymous Login

Connect to an AI assistant without requiring a credential. The anonymous_login option accepts an object with the target configuration:
Example — Continue a conversation:

Connection

Control WebSocket, reconnection, and region behavior.
The SDK automatically reconnects when the WebSocket drops. There is no reconnect option — reconnection is always automatic.
Enable call recovery:

ICE & Network

Configure STUN/TURN and ICE behavior.
The SDK automatically provisions STUN/TURN servers. You don’t need to configure iceServers in most cases. See Network Requirements.
Force TURN for privacy:
Custom ICE servers:

Audio

Custom ringtone and ringback:

Call Reports

Enable post-call quality monitoring and real-time stats. Call reports are enabled by default. You can customize the interval:
Listen for stats:
See Monitor Call Quality for the full data schema.

Debugging

Configure debug output for troubleshooting. Enable console debug logging:
Send to debug visualizer:
Write debug data to a file:
See Debug Call Issues for interpreting debug output.

Media Permissions Recovery

Handle microphone permission failures for inbound calls with a recoverable error pattern. When enabled and getUserMedia fails while answering an inbound call, the SDK emits a recoverable telnyx.error event with resume() and reject() callbacks. Your app can prompt the user to fix permissions before the call fails:

Full Example


See Also