Building a custom chat client using the CXone Guest API to avoid the widget overhead. The WebSocket connection establishes fine, and I get the guest token back from the handshake endpoint.
When I try to send the first message, the server kills the connection with a 401 Unauthorized. Here is the payload I’m pushing:
{
"type": "message",
"id": "msg-001",
"body": "Test message",
"timestamp": "2023-10-27T10:00:00Z"
}
The token is valid for 24 hours according to the docs. I’ve checked the expiry, and it’s fresh. Tried resetting the token, same error. The logs show the handshake succeeded but the subsequent frame is rejected. What am I missing in the frame structure?