Incorrect access token issue

cryptonoob321
cryptonoob321 edited January 3 in API clients
Today I am getting an error of incorrect access token when I run my script to place sell orders for CNC stocks and also for placing MIS orders. I use the same method everyday for fetching the access token. I fetched today's token at 7:20 AM, my API login script gave an error at market open when the script tried to sell orders. I tried fetching the access token again right now, the token didn't change and I am facing the same issue of incorrect access token while placing sell orders. Why is this happening?
  • cryptonoob321
    I just did some tests with today's access token. I am able to cancel pending orders using API with today's access token, so it appears that login isn't the issue since cancel is working fine. Why am I not able to place sell orders with the same access token then?
  • sujith
    You can always enable debug logs and see what are the params and response you are getting.
  • cryptonoob321
    Incorrect `api_key` or `access_token`.

    This is the response that I am getting when I am trying to sell. For fetching quotes or cancelling open orders, there is no error
  • cryptonoob321
    So after a lot of testing, I can see that the script is working perfectly fine from my laptop (Indian IP), but the same script is giving error from my VPS (Finland IP). I've never faced this issue before. What could be the problem?
  • sujith
    Can you private message the complete request and response with status code? You can enable debug logs while initializing kite connect object.
  • cryptonoob321
    I was only able to respond to this now after market hours. Now when i check, I am able to place amo sell orders on both vps and my laptop. Unable to recreate the error now, in case I face this issue tomorrow during market hours I will log it and private msg you. Thanks
This discussion has been closed.