Issue with Access Token

tasklive
@sujith
I am able to login though v3 and its getting logged in successfully. For proceeding to the next process, how can I get Access Token which I can set for processing my order placement..?

I am using Login URL : https://kite.trade/connect/login?v=3&api_key=5frpr756dbb......

After using the login url its returned with
Session ID : https://kite.zerodha.com/connect/login?sess_id=wccqn1zqyaq6qjkgaid1lflxxvb21twy&api_key=5frpr756db........&v=3

After successfully login.........Its redirecting to url
Request Token URL : https://XYZ.com/Postback.php?status=success&request_token=sekorBjONjTPmJTj4KLcqnpzEQNydfAa

Now, please suggest me further steps to be followed for getting the access token and placing orders.

Thanks in advance.
  • sujith
    Hi,
    An access token is valid for one whole day. Once you get access token you can store it in preference or database and re use it. You just need to make sure you don't call generateSession every time you run the app.
  • tasklive
    @sujith
    Thanks for your reply. But as intimated I am able to login and get request token as displayed in below url.

    After successfully login.........Its redirecting to url
    Request Token URL : https://XYZ.com/Postback.php?status=success&request_token=sekorBjONjTPmJTj4KLcqnpzEQNydfAa

    01. Request token and access token are the same..?
    2. How to get and store access token?
    3. What will be the next step after getting access token..? Should I need to go for placing the order..?

    Any developer here who can support me for Login Flow and Order placement in VB.NET..?
  • sujith
    Hi,
    The request token and access token are different. Check out user flow here.
    You can refer to samples here. You can also convert .NET examples to VB.NET using some online converter.
Sign In or Register to comment.