> For the complete documentation index, see [llms.txt](https://documentation.sceenic.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.sceenic.co/watch-together-sdk/sscale-confluence-api-references/sscale-confluence-web-sdk-reference/sscale-confluence-sessionlisteners-websdk/wtsessionlisteners.onmessagereceived-fn.md).

# WTSessionListeners.onMessageReceived(fn)

`onMessageReceived(fn)`

`const fn = ({message, participantId}) => {/*code*/}`

The callback will be invoked when a participant sends a message to the session

* message - string message
* participantId - identification of participant that sent a message
