I used websocket coding as well as using ‘request’ tried to read option datas, run the sample code in the upstox website, For me fetching the historical data of any share is working but when Iam trying the same for FO it is showing unauthorised access. Error 401. I have already subscribed FO in my account, then why Iam getting this eror?
You are receiving a 401 error because you may be passing an invalid token or using the correct token but in an incorrect format.
Please refer to this example code to see how to send an access token via a cURL request:
Example Code
Additionally, check the documentation on how to generate an access token:
Authentication Guide
Thanks!