I have run into what appears to be the same issue: if I call api/aaaLogin.json including the gui-token-request=yes parameter, I can no longer open a WebSocket connection (I receive a 404 error instead of the 101 success response code).
Is there a way to pass the APIC-challenge when creating the WebSocket or do I have to remove the gui-token-request=yes parameter to aaaLogin?
(This is an external application, so I assume api/requestAppToken.json is not an option.)