NodeJs how to get request token

srinicipher
srinicipher edited December 2017 in General
Hi

I am trying this API from desktop program not from web.

I am trying to connect api via NodeJS and wondering how to get the request token.

If u look at the example here
https://github.com/rainmattertech/kiteconnectjs/blob/master/README.md

How we get the request token

When I run the same code with my api key and secret it says session invalid and token exception


Any suggestion would help
Tagged:
  • sujith
    Hi,
    You need to use Webview in a desktop application in order to use Kite Connect login.

    A user has to manually log in to Kite Connect webpage and after completing login user will be redirected to pre-defined redirect URL with request token. The request token can be used only once and its validity is only for a couple of minutes. Use the above-obtained request token to retrieve an access token. The access token is valid for one whole trading day. Once access token is retrieved store it and re-use it for subsequent runs. A user shouldn't request for access token for every run.

    You can check out webinar here.
  • srinicipher
    Hi Sujith,

    I just need to fetch price of some of the mutual funds in periodic basis from a desktop program.

    Can this be done?
  • sujith
    sujith edited December 2017
    Hi,
    Unlike stocks, a mutual fund NAV(last price) is updated only once a day.
    You need to fetch instrument dump and store it. You can fetch the last price from that dump.
    You can check out mutual funds instrument documentation.
  • sujith
    Please open new threads for new queries. It might help others who are looking for the same.
  • srinicipher
    Ok, So this URL helped me to dump all the instruments.

    https://kite.trade/connect/login?api_key=

    I have some more queries, for benefits of other users I will raise in different thread.

    Thanks Sir!
This discussion has been closed.