Beta/Testing environment

sachet_singh
Hi -- Do you have any testing/beta environment , where we can test our code ?
  • sujith
    Hi @sachet_singh,
    We don't have sandbox environment. It is on our list.
    Currently we are working on revamp of our core APIs.
    Check out this thread https://kite.trade/forum/discussion/943/update-revamping-of-core-api-infrastructure
  • sachet_singh
    ok, thanks. now today, on production env. we are getting com.rainmatter.kitehttp.exceptions.KiteTokenException. may be because markets are closed ?

    I get request token, but this call fails

    UserModel userModel = kiteconnect.requestAccessToken(request_token, request_token);

    If there is sandbox env, it helps. this is a paid service afterall, and even if code works, we are experimenting on production data.
  • sujith
    Hi @sachet_singh,
    The request token is valid only for a couple of minutes and it can be used only once whereas access token is valid for a whole day till next trading session. I would suggest storing access token once you get it and use it in next run.
    Don't request for access token every time you run your app.
  • sachet_singh
    I am taking fresh request token, and it gets printed fine. when i invoke

    UserModel userModel = kiteconnect.requestAccessToken(request_token, request_token);

    this call fails. Unless this passes, i cannot proceed.
  • sujith
    @sachet_singh,
    Don't make this call every time you run the app.
    It will only work only for the first time because request token you pass in the argument can be used only once.

    All API calls are authenticated using access token and not by request token. The access token is valid till next trading session.
    Once you get usermaodel.accessToken store it somewhere and reuse it for next run.
  • sujith
    @sachet_singh,
    You can continue on this thread.
This discussion has been closed.