Access the Chat API Consumer. You can instantiate a Chat.Client to subscribe to Chat events. Please check Chat.ChatClientApiEvents for the full list of events that a Chat.Client can subscribe to.
Example
The following example logs the messages sent to the "welcome" channel.
const chatClient = new Chat.Client({
project: '<project-id>',
token: '<api-token>'
})
chatClient.on('message', m => console.log(m))
await chatClient.subscribe("welcome")