For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
Reference
Reference
  • Core
    • Overview
    • RELAY Browser SDK v2 vs v3
    • Call
    • Notification
    • RELAY Client
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Types
  • refreshToken
  • callUpdate
  • participantData
  • userMediaError
Core

Notification

Deprecated
|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

RELAY Client

Next
Built with

A notification is an event that SignalWire dispatches to notify the Client about different cases. A notification can refer to the JWT expiration, Call changes or Conference updates.

Types

Every notification has a property type that identify the case and the structure of the data.
The available type are:

ValueDescription
refreshTokenThe JWT is going to expire. Refresh it or your session will be disconnected.
callUpdateA Call’s state has been changed. Update the UI accordingly.
participantDataNew participant’s data (i.e. name, number) to update the UI.
userMediaErrorThe browser does not have permission to access media devices. Check the audio and video constraints you are using.

refreshToken

Your JWT is going to expire. Refresh it or your session will be disconnected.

Anatomy of a refreshToken notification.

1{
2 type: 'refreshToken',
3 session: RelayInstance
4}

callUpdate

A Call’s state has been changed. It is useful to update the UI of your application.s

Anatomy of a callUpdate notification.

1{
2 type: 'callUpdate',
3 call: CallObject
4}

participantData

This notification contains the participant data for the current Call. This is useful when updating the UI.

Anatomy of a participantData notification.

1{
2 type: 'participantData',
3 call: CallObject,
4 displayName: 'David Roe',
5 displayNumber: '1777888800'
6 displayDirection: 'inbound'
7}

userMediaError

The browser lacks of permissions to access microphone or webcam. You should check which audio/video constraints you are using and make sure they are supported by the browser.

Anatomy of a userMediaError notification.

1{
2 type: 'userMediaError',
3 error: error
4}