Hi,
I am using Unity, we are making a multiplayer VR game with a lobby system.
Polling the data from lobbies is too slow for our use case, so we want to speed this up.
After some research SignalR seems to be the way to go.
We can't use ASP.NET because not only does this not seem to work with Unity, NuGet packages generally break cross platform portability in Unity, there is no asset or package that adds support for ASP.NET to Unity, nor do we have time to make our own.
Instead, we are using an asset from the Unity asset store called Best HTTP/2, which has everything ASP.NET has including the HubConnection.
https://assetstore.unity.com/packages/tools/network/best-http-2-155981
I can successfully get the server url and access token from the negotiate rest API, which I assume I have to use in the HubConnection. According to the PlayFab documentation, the token must be passed through the header. The asset we use is a little different from ASP.NET as it uses interfaces for authorization and such. But I wrote a custom authorization script that passes the token to the header.
The problem is I cannot find which key to use for the token, since the header uses key value pairs. I've tried X-SecretKey, X-AccessToken, AccessToken, etc and all I get when trying to connect is the following error:
Negotiation Request Finished Successfully, but the server sent an error. Status Code: 401- Message:
The empty message doesn't help either.
Am I doing something wrong or is there a very specific key for this access token?