Genesys Cloud Guest API WebSocket connection failing with 400

I’m trying to build a custom chat UI using the WebSocket-based Guest API instead of the default widget. The connection fails immediately with a 400 error.

Here’s my handshake code:

const socket = new WebSocket('wss://api.mypurecloud.com/api/v2/conversations/webchat/guest/sessions');
socket.onopen = () => {
 socket.send(JSON.stringify({
 'type': 'connect',
 'version': '1.0'
 }));
};

The docs don’t mention needing auth headers for the initial connection. What am I missing?