Access token invalidated within 24 hours

sabyasm
Why does the simple login process not work many times during outside market hours? Even though the access_tokens are supposed to be valid for 24 hours unless otherwise forcefully invalidated, I have seen frequent errors "Message build error" while trying to access the api.

The usual remedy is to refresh the access token. For example: my access token was last refreshed at 10:30 AM on Apr 16 but when I am trying to access the api at 2:00 AM (April 17), I get "Message build error". When I try to login via kite web to generate fresh access token - I am getting the error " 2FA is blocked on your account. Please reset your password or contact support."

In addition to that - gateway timeout error while logging in to kite is fairly common (specially around midnight). Could you please throw some light on this?

1. Why the login service doesn't work 24x7
2. Why does the access_token needs a refresh within 24 hours ( I get that at around 7AM all access_token are reset but I am getting the error at 2 AM)?

@sujith @Kailash @tonystark
  • sujith
    @sabyasm,
    BOD process runs post-midnight to early morning around 6:30 AM. OMS will not respond to any requests during this period.
  • sabyasm
    @sujith - sorry what is BOD? Also - what does the login process has to do with OMS?

    I hope I am not coming across as rude, just curious to understand the architecture.
  • sujith
    BOD is beginning of the day process. It includes many complex internal processes which need to be done to make OMS ready for trading.
    User management is done at OMS level and hence the login.
    NEW UPDATE: It happens until 04:00 AM.
  • sabyasm
    @sujith Thanks. Here's what my understanding is - let me know.

    Midnight - 4:00 AM - BOD process - kite might be unavailable
    4:00-7:00AM - kite api should be available (mostly) . Previous days access token should work
    ~7:00 AM - Previous day's access token gets invalidated here
    ~7:30AM-Midnight - kite api available 100% and any access token generated here should remain valid till next day 7AM

    Let me know if I got this right.
  • sujith
    Yes, you are right. This is the expected be behavior.
  • Prape
    Dear Sujith, is it possible to generate access token after 4 am?
  • sujith
    Yes, you can generate but it will be flushed at around 06:30 AM to 7:00 AM. You will have to generate again after that.
  • sujith
    A flush process on access tokens is run during this time.
Sign In or Register to comment.