Login Flow errors

ABSphreak edited September 2023 in API clients
Hello everyone!

I am using kiteconnect REST APIs inside my Next.js 13 (App Router) project.
I have implemented login redirection flow, as explained in the docs
but I keep getting weird errors on final POST API call to /session/token
Sometimes, it shows checksum is not proper (not invalid, but not of the right length),
Sometimes it shows request_token is not of proper length
But I have made sure that everything is proper.
I can share the code, or get on a GMeet with you. Please help.

Guide me in the right direction.
  • sujith
    Are you sure you are taking care of all the error scenarios? You can know more about the request parameters here.

    PS: The API is working fine, it is used by thousands of production Kite Connect apps.
  • ABSphreak
    ABSphreak edited September 2023
    Hey @sujith , thanks for the response

    Here is the console logged body of the request to POST /session/token call
    URL: https://api.kite.trade/session/token
    api_key: 'replacedt0xc2rnd',
    request_token: 'yEdjiecgCfereplacedjeMPg3zhTd1q',
    checksum: '03replaced34df3c54b41replaced893a2b5ecareplacedc8ca14bf1replaced'

    I have replaced some of the letters in the values for security reasons.

  • sujith
    Are you sure, your SHA 256 hash is correct?
    You can also check out this thread, which has info about request token.
Sign In or Register to comment.