obs-websocket provides a feature-rich RPC communication protocol, giving access to much of OBS's feature set. This document contains everything you should know in order to make a connection and use obs-websocket's functionality to the fullest.
The following message types (`messageType`) are the base message types which may be sent to and from obs-websocket. Sending a message with a `messageType` that is not recognized to the obs-websocket server will result in your connection being closed with `WebsocketCloseCode::UnknownMessageType`.
### Hello {basemessage_hello}
- Sent from: obs-websocket
- Sent to: Freshly connected websocket client
- Description:
### Identify {basemessage_identify}
- Sent from: Freshly connected websocket client
- Sent to: obs-websocket
- Description:
### Identified {basemessage_event}
- Sent from: obs-websocket
- Sent to: Freshly identified client
- Description:
### Reidentify {basemessage_reidentify}
- Sent from: Identified client
- Sent to: obs-websocket
- Description:
### Event {basemessage_event}
- Sent from: obs-websocket
- Sent to: All subscribed and identified clients
- Description:
### Request {basemessage_request}
- Sent from: Identified client
- Sent to: obs-websocket
- Description:
### RequestResponse {basemessage_requestresponse}
- Sent from: obs-websocket
- Sent to: Identified client which made the request