Hi, I am trying to post "https://api.kite.trade/session/token" with below details in postman. But I am getting below response. Kindly help. { "status": "error", "message": "`api_key` should be minimum 6 characters in length.", "data": null, "error_type": "InputException" }
X-Kite-Version = 3 Also I have checked all the keys and they are as expected. For security purpose, I have made them as xxx,yyy & zzz in the screenshot.
I have used below java function for "SHA-256" public static byte[] getSHA(String input) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA-256"); return md.digest(input.getBytes(StandardCharsets.UTF_8)); }
public static String toHexString(byte[] hash) { // Convert byte array into signum representation BigInteger number = new BigInteger(1, hash); // Convert message digest into hex value StringBuilder hexString = new StringBuilder(number.toString(16)); // Pad with leading zeros while (hexString.length() < 32) { hexString.insert(0, '0'); }
return hexString.toString(); }
Called it as 'toHexString(getSHA(API_KEY + REQUEST_TOKEN + API_SECRETE);'
Please find the input parameters in screenshot below