***
id: 57c8d465-3738-4148-892a-cbb80b08552a
title: Events
slug: /js/reference/pubsub/client/events
max-toc-depth: 3
----------------
The PubSub.Client object emits the events listed below. You can work with these events using the following methods:
Subscribe to an event
Subscribe to an event once
Unsubscribe from an event
Remove all event listeners
## Events
### message
* **message**(`message`)
A new message has been received.
The received message. See [`PubSubMessage`](/docs/browser-sdk/v3/js/reference/pubsub) for more details.
***
### session.expiring
* **session.expiring**()
The session is going to expire. Use the [updateToken](/docs/browser-sdk/v3/js/reference/pubsub/client/update-token) method to refresh your token.