We are getting this error with new version kite connect 3, but same thing is working fine for lower version api 02-07 13:30:38.527 5197-5685/com.zenwise.zambalafollower D/OkHttp: <-- 502 Bad Gateway https://api.kite.trade/session/token (267ms) 02-07 13:30:38.527 5197-5685/com.zenwise.zambalafollower D/OkHttp: Server: nginx 02-07 13:30:38.527 5197-5685/com.zenwise.zambalafollower D/OkHttp: Date: Wed, 07 Feb 2018 08:00:17 GMT 02-07 13:30:38.527 5197-5685/com.zenwise.zambalafollower D/OkHttp: Content-Type: application/json 02-07 13:30:38.527 5197-5685/com.zenwise.zambalafollower D/OkHttp: Content-Length: 83 02-07 13:30:38.527 5197-5685/com.zenwise.zambalafollower D/OkHttp: Connection: keep-alive 02-07 13:30:38.530 5197-5685/com.zenwise.zambalafollower D/OkHttp: {"status": "error", "message": "Gateway is busy", "error_type": "NetworkException"} 02-07 13:30:38.530 5197-5685/com.zenwise.zambalafollower D/OkHttp: <-- END HTTP (83-byte body)
Are you using any Kite Connect client library?
Make sure to take a look at cURL examples, the request format has changed. All the auth tokens are now sent in the header.