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.
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.
PS: The API is working fine, it is used by thousands of production Kite Connect apps.
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.
You can also check out this thread, which has info about request token.