It looks like you're new here. If you want to get involved, click one of these buttons!
WebSocket connection upgrade failed (403 - Forbidden)From the previous forum discussions (here and here), I understand that problem occurs if incorrect access_token is used. However, this has never been a problem until I upgraded to 3.9.5, and the same program ran without any problems ever in the previous version, 3.8.1!
Quick help on this is appreciated since I have high stakes. Thank you.
v3.9.5 has breaking changes. You need to upgrade to a stable version v4.0.0. The same was announced here.
You can upgrade using
pip install --upgrade kiteconnect
I just upgraded to 4.0.0, but this 403 problem still persists.
Please let me know if you need more data. You may appreciate my urgency. I have also tried
connect(threaded = True, disable_ssl_verification = True)
without success.Thank you...
Are you able to make other API calls using same access_token? Like order book, portfolio fetch, etc?
Why connection requested is being rejected now, after the upgrade? Give me a clue and I can try figuring it out.
Also, print access_token while making API requests and subscribing to Websocket and compare, if both are the same.
renew_access_token()
?This is what
generate_session()
returned:I may have logged in about 20 times today, but that doesn't help.
@rakeshr , I have just IM'ed an order executed by the app. All APIs work, it is just that the WS connection fails every time, and therefore, ticks don't arrived.
..?api_key='your_api_key'
correct would be :
..?api_key=your_api_key
Hence it kept throwing 403.