Hi @arjunender, Request token can be used only once and is valid only for a couple of minutes. An access token is valid for one whole day. Once you get access token store it in preference and use it for further use. Don't call RequestAccessToken every time you run the app.
Hi @arjunender, It is mandatory by the exchange that a user has to manually login at least once a day. You will have to use a browser to log in. Can you give the error message or take a screenshot and paste a link?
I am using .net WebBrowser and assigning kite connect url to the browser webBrowser1.Url = new Uri(kite.GetLoginURL()) kite login page appears but with below error messages and not able to login
Unfortunately .Net WebBrowser component uses Internet Explorer 6 ActiveX component behind the scenes. This is a very old and deprecated tech. I suggest you open the link directly in your default browser like:
Process.Start("https://www.google.com");
or if you really want to use a browser component try better alternatives like: DotNetBrowser or CefSharp
It seems there is some issue in your authentication process. Try wrapping your code inside a try catch block like this to get the error information: Use JsonSerialize function from this sample code.
ResponseData:
Status : error
Message : Invalid session credentials
Error type : TokenException
Thanks
Request token can be used only once and is valid only for a couple of minutes. An access token is valid for one whole day. Once you get access token store it in preference and use it for further use.
Don't call RequestAccessToken every time you run the app.
OK Got it
How to login to kite.connect from .net
I am using web browser but giving javascript errors
thanks
It is mandatory by the exchange that a user has to manually login at least once a day. You will have to use a browser to log in.
Can you give the error message or take a screenshot and paste a link?
I am using .net WebBrowser and assigning kite connect url to the browser
webBrowser1.Url = new Uri(kite.GetLoginURL())
kite login page appears but with below error messages and not able to login
thanks
Unfortunately .Net WebBrowser component uses Internet Explorer 6 ActiveX component behind the scenes. This is a very old and deprecated tech. I suggest you open the link directly in your default browser like: or if you really want to use a browser component try better alternatives like: DotNetBrowser or CefSharp
Thanks for your suggestion.
I will try these solutions
Actually I don't want to copy Request Token or Access Token manually
Thanks