Hello Team I use websocket streaming for watch market in webpage. I use kite connect version 3 from past 4-5 months. But from last 5 days i fetch issue in access token. Access token is expired frequently, i need relogin again and again for get new access token. i think some one delete my access token because api key and access token details opened in my webpage. is it possible to access token not expire whole day ? Also i read all related post from this forum but i not get any helpful. please help me. Thanks
@gjmaster An access token is valid for one whole day. Unless you log out. Don't request for access token in every run. Once you receive an access token, use the same for subsequent runs. If your previous access token is still active then the system will give you back the same access token which is fine. Can you paste here complete traceback?
I save access token in database then use access token in ticker.js but after some time when i refresh webpage then token automatically expired. then i delete a session by this url https://api.kite.trade/session/token?api_key=$api_key&access_token=$current_access_token"; when i run up request then i will get reponse "Invalid Token or Api Key" means last token expired after that again login and regenerate access token but in just 5-10 minutes it expired. also please note that i fetch this problem from last 5 days. there is no problem before 5 days i used this webpage and ticker.js from last 6 months where no problem. also thx for your reply
I clear all my session and after that try with new access token but i get error in websocket here is console log Firefox can’t establish a connection to the server at wss://ws.kite.trade/?api_key=something&access_token=something&uid=1537637266008 403 forbidden Error
I also get the same problem from last few days.I do the same things and save access token in database and fetch from there but it expires at any time as before it remains for wholeday.Please solve this issue as soon as possible.
We had created access tokens for a couple of apps in the morning and it is still active. Are you sure, you are not logging out or calling generate session again?
yes i am not calling again, now access token working only for 1 time. when refresh page with same access token its expired. (i use websocket ticker.js officially from github)
An access token is valid for one whole day. Unless you log out. Don't request for access token in every run. Once you receive an access token, use the same for subsequent runs. If your previous access token is still active then the system will give you back the same access token which is fine.
Can you paste here complete traceback?
when i run up request then i will get reponse "Invalid Token or Api Key" means last token expired after that again login and regenerate access token but in just 5-10 minutes it expired.
also please note that i fetch this problem from last 5 days. there is no problem before 5 days i used this webpage and ticker.js from last 6 months where no problem.
also thx for your reply
Can you go to profile page in kite web and check all active session under Active session?
Firefox can’t establish a connection to the server at wss://ws.kite.trade/?api_key=something&access_token=something&uid=1537637266008
403 forbidden Error
Are you sure, you are not logging out or calling generate session again?