Not getting the required response from websocket

I am trying to connect to websocket to get the authorise url to get the live feeds data from market

Authorization: xxx

Error: Unexpected server response: 200

Handshake Details

Request URL:
Request Method: GET
Status Code: 200 OK

I am getting a 200 response code from the server but not getting the authorized_redirect_uri data.
I am trying to connect from postman
Have shared the url and headers I am using

I recommend using the SDK to connect to the WebSocket. You can try the Python SDK available here: Upstox Python SDK. Detailed information about the WebSocket can be found in the README file on the same page.

These SDKs are designed to help you get started quickly. Similar SDKs are also available for:

I wanted to test the websocket on the postman first, so that I have the sure about using it.
I am not getting the expected response, can you help me with that.


The authorization endpoints for both portfolio and market data are HTTP GET endpoints. The following cURL command should assist you in fetching the WebSocket URI for market data. Please include your access token in the header.

curl -X 'GET' \
  '' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer <ACCESS_TOKEN>'

Do let us know if this worked as expected.


1 Like

Thanks @shanmu that worked. now I am getting the required response with the authorizedRedirectUrl.
But using that url I am able to connect through websocket successfully but after sending the message not receiving any message response, testing the whole thing in postman.
Message that I am sending:
“guid”: “someguid”,
“method”: “sub”,
“data”: {
“mode”: “full”,
“instrumentKeys”: [“NSE_INDEX|Nifty 50”]

@Kautilya - Looks like the payload may not be sent as binary data. Please attempt to send it as binary and inform us if this resolves the issue.

Thank you!

@shanmu This was resolved thanks for the help