I want to connect to the nest endpoint using a .net wss client. I am unsure how to pass the NEST access_token during handshake to the endpoint to complete the authorization handshake.
In the api samples I can only find javascript examples using firebase client lib which does not help much. Can someone explain what should I do to complete the wss handshake ?
I found out what was the problem.
There was a 'bug' in the web socket library I was using. The header value "Upgrade: websocket"
which is passed during websocket handshake was passed like this "Upgrade: webSocket".
Some websocket test servers are case insensitive but not the one from Google Nest.
Once I changed this to "websocket" I got a proper websocket handshake response and no redirection either.
Access token is added as a query parameter when connecting with websockets to the nest endpoint.
Once the connection is established I am again in the dark on how to establish subscribtion to certain events or query data but this will be the topic for another question.