C-Sharp [C#] Websocket Authorization Error (accessTokenRequest)

Hello, I try this:

→ On wss://live.tradovateapi.com/v1/websocket

        string endpoint = "auth/accessTokenRequest";
        var id = Interlocked.Increment(ref RequestCounter);
        string queryParams = "";

        string body = "{\"name\":\"" + name_ + "\",";
        body = body + "\"password\":\"" + password_ + "\",";
        body = body + "\"appId\":\"" + appId_ + "\",";
        body = body + "\"appVersion\":\"" + appVersion_ + "\",";
        body = body + "\"deviceId\":\"" + deviceId_ + "\",";
        body = body + "\"cid\":\"" + cid_ + "\",";
        body = body + "\"sec\":\"" + sec + "\"}";

        var frame = $"{endpoint}\n{id}\n{queryParams}\n{body}";

        websocket.Send(frame);

But I receive an immediately Code: 1000 Reason: Bye

Do you know, what happens here? Thanks!

Ok, I have the answer now from FAQ in Github.

AUTHENTICATION is only in REST API’s in auth/accessTokenRequest

Hi @son_hoang ! Thanks for the response! And yes, I use C# and yes, I use a websocket in C#.

The problem is that is impossible to obtain in Websocket (See FAQ Reply), only in REST API. (https://demo.tradovateapi.com/v1/auth/accessTokenRequest || https://live.tradovateapi.com/v1/). I’m able now to obtain via REST API, when I finish I will upload the code for the Community.

And I don’t know if this Community is or not Horrible but I want to contribute to be better. Good luck!