I’ve been attempting to establish a websocket connection via the High Performance Backend, but am unable to get this working.
As covered in the Talk API docs, I’ve been trying to send a Hello message to establish the initial connection:
I’m running in an environment with no DNS server, so have configured everything using IP addresses. I have NextCloud 22.2.3 running on 192.168.4.56 and the v0.4.0 of the backend on 192.168.4.57, and am simply trying to establish communication from a client machine on 192.168.4.58.
I’m finding the documentation lacking in this area; I’m not sure if I should just be able to use the NextCloud server as the Auth backend, or if this will need a separate authentication server.
The hello message I’ve been trying to send is:
{
"id": "unique-request-id",
"type": "hello",
"hello": {
"version": "1.0",
"auth": {
"type": "client",
"url": "http://192.168.4.56",
"params": { }
}
}
}
If I add an entry for the NextCloud server in the [backends] section of the server.conf file and send this to the spreed websocket, spreed successfully retrieves the list of capabilities from the NextCloud server:
backend_client.go:199: Capabilities expired for http://192.168.4.56/ocs/v2.php/cloud/capabilities, updating
backend_client.go:262: Received capabilities map[config:map[attachments:map[allowed:false] chat:map[max-length:32000 read-privacy:0] conversations:map[can-create:false] previews:map[max-gif-size:3.145728e+06]] features:[audio video chat-v2 conversation-v4 guest-signaling empty-group-room guest-display-names multi-room-users favorites last-room-activity no-ping system-messages delete-messages mention-flag in-call-flags conversation-call-flags notification-levels invite-groups-and-mails locked-one-to-one-rooms read-only-rooms listable-rooms chat-read-marker webinary-lobby start-call-flag chat-replies circles-support force-mute sip-support chat-read-status phonebook-search raise-hand room-description rich-object-sharing temp-user-avatar-api geo-location-sharing voice-message-sharing signaling-v3 publishing-permissions clear-history chat-reference-id]] from http://192.168.4.56/ocs/v2.php/cloud/capabilities
But I then get an error when the hello message is sent to the NextCloud server:
backend_client.go:371: Received unsupported content-type from http://192.168.4.56: text/html; charset=UTF-8 (200 OK)
The content of the returned HTML appears to be the login page.
Am I simply failing to send the authentication information in hello.auth.params (if so, what’s is the correct format?), or am I doing this completely wrong?