Polygon Stream Authentication Failed

I already have a funded account of $100. I generate a new set of secret key. But I still get “authentication failed” when I authenticate to polygon stock cluster stream. Is there something else I need to do?

how are you coding the authentication process?

Here you go. I also tried connecting to Alpaca Data Stream and even REST API but I still can’t authenticate. It seems like an issue with my account and I called customer support and refer me to the forums. Really frustrating.

            if (this.clientWebSocket == null)
        {
            this.clientWebSocket = new ClientWebSocket();
            await this.clientWebSocket.ConnectAsync("wss://alpaca.socket.polygon.io/stocks", CancellationToken.None);

            await Send(new AuthenticateRequest
            {
                Action = "auth",
                Params = "{live api key}"
            });

            var response = await Receive<List<AuthenticateResponse>>();

            if (response.Where(_ => _.EventType == "status" && _.Status == "connected").FirstOrDefault() == null)
                throw new Exception(string.Format("Unable to authenticate: {0}", response[0].Message));
        }

dang, I wish I could help. I’m doing most of my stuff in Python. I find it a bit easier.

perhaps this will help?

Thank you. But Im also getting the same issue with the SDK. That just reinforces my belief that it has something to do with my account. I already generated multiple API keys and none of them work.

check your wss uri. Looks like it may be wrong.

That’s what in the documentation => https://alpaca.markets/docs/api-documentation/api-v2/polygon-integration/

hmm…yeah would definitely say it must be an account issue.

You will see an authentication error message saying “invalid API key” if your account does not have Polygon access.

The only other thing I could think would be the way the syntax is in the code?? I am no C# master though, lol.

{
        "action":"auth",
        "params":"YOUR_API_KEY"
}

Verified. Syntax is correct.

Were you ever able to figure this out? Im having the exact same problem.

Generating new keys fixed the authentication issue for me.