Anyone try with Chat WSS ?

Today I try to connect to chat WSS and I got this error:

{“content”:“ILLEGAL_PARAM”,“self”:false,“type”:“error”}

I replace listenKey and listentoken and put wss format as FAQ:
wss://im.binance.com:443/chat/c2c_xxxxxxxxxxxxxx?token=TOKENxxxxxxxxx&clientType=web

Where did you obtain wss://im.binance.com:443 URL ?

from here: P2P Merchant Portal

5.4 SAPI notification and chat related FAQ

Q1: How to get notifications of orders or chat?

It can be found In the response of this API

/sapi/v1/c2c/chat/retrieveChatCredential

Then, get the wss url and the credential as following

{
    ""code"": ""000000"",
    ""message"": ""success"",
    ""data"": {
        ""chatWssUrl"": ""wss://im.binance.com:443/chat"",
        ""listenKey"": ""c2c_xxxxxxxxxxxxxx"",
        ""listenToken"": ""TOKENxxxxxxxxx""
    },
    ""success"": true
}

Next, you should connect to wss by

wss://im.binance.com:443/chat/c2c_xxxxxxxxxxxxxx?token=TOKENxxxxxxxxx&clientType=web

Finally resolve the problem.

The problem come from calling the retrieveChatCredential API incorrectly.

Change “clientType”: ‘any’ to “clientType”: ‘web’ had fixed the problem.