Websocket Auth Issues

  1. Got the wss url using the following:
    Portfolio Stream Feed Authorize Url | Upstox Developer API

  2. Once I connected to wss url, it was working fine (till yesterday) without any additional authentication headers (on wss websocket request)

Today, all of a sudden I am getting unauthorized error, see screenshot below:

WSS URL:
wss://wsportfolio-api.upstox.com/upstox-developer-api/order-updates/feed?requestId=9934cb8d-0fbd-48b2-b28a-4ae34535d843&code=1DAPx-eb656a03-6daa-4381-8cde-37d18980f90e

@priteshmhatre

The url generated to connect to the websocket is valid for one time use as the code param present in the URI is for single-use. Please generate a new URL to reconnect to the websocket. We’ll explicitly mention this in the documentation.

On the contrary, using the Market Feeder Auto Redirect Endpoint should take care of the auth and re-connect automatically.

Thanks!!

@shanmu

I am regenerating the url, so I looked further into it.

My connection is established & later disconnected with following error message. This message comes when I send a ping. My pings are a simple text message with word ping.

WS connection closed. Status [CloseStatus[code=1003, reason=Client messages not supported]]

So, it seems this is the cause. Please give me the exact format of the heartbeat message.

@priteshmhatre

Please refer to the following response:

@shanmu Please close the ticket.