I get this error when trying to re-connect after the disconnect. Have to re-launch my app to handle this error. I understand 403 error is due to invalid token but it was working until the time it got disconnected. What could be the issue? Log:
11:20:10:SEVERE:onDisconnected 2020-01-31 11:20:10 11:20:10:SEVERE:doReconnect 2020-01-31 11:20:10 11:20:11:SEVERE:The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 403 Forbidden 11:20:11:SEVERE:The status code of the opening handshake response is not '101 Switching Protocols'. The status line is: HTTP/1.1 403 Forbidden
Authentication is done only while connecting to websocket and not while sending every tick. Hence even though your session had expired you kept getting ticks. You will have to create a new access token while doing the re-connect.
Thanks for responding @sujith . Application was first launched in the morning at around 8:25 AM. i believe when i connect during that time a fresh token will be generated for that day. It connected and received ticks from 9:15 to 11:20, but has shown this error when it got disconnected at 11:20 AM.
You might have logged out or logged in somewhere else. Hence that access token would have become invalid. Ideally, you must be able to use it throughout the day.
I login in parallel on my mobile, i think that shouldn't be an issue based on what i read from this forum. The only scenario i can think of is - i have two different applications for this auto trade - one to store data in db and the other to fulfill orders. If one got logged out and re-logged in , the other might have this issue.
However, even if I re-login shouldn't that be the same access token as it's valid throughout the day?
Ideally, you must be able to use it throughout the day.
However, even if I re-login shouldn't that be the same access token as it's valid throughout the day?