I just signed in for the API and facing a weird issue which is not covered anywhere as far i could see, googling for hrs didn't return any similar cases, so i am posting it here.
{"status":"error","message":"Invalid or expired connect session. Try re-initiating login.","data":null,"error_type":"InputException"}
I was able to capture the access token few times and test it with my Java code and it is working fine. But development requires hundreds of compilations and each time trying to copy this fleeting url successfully is a frustrating job.
I have tried clearing the browser cache but the issue remains the same, it flashes and moves to show the error page.
The redirect URL on the app configuration page should be
https://zerodha.com/
and the kite connect URL pasted on the address bar should be
https://kite.trade/connect/login?v=3&api_key=properAPKey
and you will see a returned page with following URL on the address bar
https://zerodha.com/?status=success&request_token=dpmjmsm1KNZXhxKvYk1i6537AcIkKN4e&action=login&type=login
Copy the request token value and use it.
Peace/
This will not work until you log in to your Zerodha account using this URL manually
https://kite.trade/connect/login?v=3&api_key=properAPKey
Then it will ask for authorization; provide the required authorization.
After that, it will work properly in automation.