Market data websocket result in 402 auth failed

I have followed the the documentation here: Real-time data - Documentation | Alpaca, and authenticate using the client key and secret created here Open an Alpaca Securities Brokerage Account. However I received these series of events:

[{"T":"error","code":402,"msg":"auth failed"}]
[{"T":"error","code":401,"msg":"not authenticated"}]
[{"T":"error","code":404,"msg":"auth timeout"}]

May I know what I did wrong?


I am dealing with the same problem. I can connect just fine using a websocket client from chrome but using Golang client I cant. Have you found resolution with this? Seems no one responded.