Although my API key is longer than 6 char and also correct, I'm still getting this error. I have tried to call Kite API via code, postman & curl both after getting request_token, I consistently get this issue while trying to get the access_token. I have checked that my checksum is correct (compared the checksum generated via code with online checksum generator tool & both are same), redirect toke is correct. Api key doesn't have any spaces.
You can follow through this thread. If it is still the issue, you can DM the code, will debug.