For Getting Access Token Request is: URL : https://api.kite.trade/session/token headers : request_token=XXXXXXXXXX&api_key=XXXXXXXXXXXXXXXXXX&checksum=(APIKEY+REQUEST_TOKEN+API_SECRET_KEY) Response I am Getting: {"status": "error", "message": "Invalid session credentials", "error_type": "TokenException"}
After Some time I tried again but this time I got success response. (the Same Request Nothing was Changed) Problem is some times I am getting success response and some time 403 forbidden error. Can you please check this issue.
Still i am facing this issue. Steps to reproduce: 1. Login through webview URL (https://kite.trade/connect/login?api_key=XXXXXXXXXXXXXXX) 2. After submitting security questions we are capturing the request token parameter from the Redirect URL 3. Then we are generating checksum (APIKEY +REQUEST_TOKEN+SECRET__KEY) Check SUM CODE JAVA: public static String sha256(String base) {/*base = APIKEY +REQUEST_TOKEN+SECRET__KEY;*/ try { MessageDigest digest = MessageDigest.getInstance("SHA-256"); byte[] hash = digest.digest(base.getBytes("UTF-8")); StringBuilder hexString = new StringBuilder(); for (byte aHash : hash) { String hex = Integer.toHexString(0xff & aHash); if (hex.length() == 1) { hexString.append('0'); } hexString.append(hex); } return hexString.toString(); } catch (Exception ex) { throw new RuntimeException(ex); } } 4. Then for generating access token we are hitting the request token url URL : https://api.kite.trade/session/token headers : request_token=XXXXXXXXXX&api_key=XXXXXXXXXXXXXXXXXX&checksum= Generated Check sum Response I am Getting: {"status": "error", "message": "Invalid session credentials", "error_type": "TokenException"} some time i am getting the following error message { "error_type" = TokenException; message = "Invalid checksum"; status = error; } Please Check This Issue.
Some time it is navigating to your webview. Please find the attached image
If it persists, can you give more details to reproduce the issue?
Steps to reproduce:
1. Login through webview URL (https://kite.trade/connect/login?api_key=XXXXXXXXXXXXXXX)
2. After submitting security questions we are capturing the request token parameter from the Redirect URL
3. Then we are generating checksum (APIKEY +REQUEST_TOKEN+SECRET__KEY)
Check SUM CODE JAVA:
public static String sha256(String base) {/*base = APIKEY +REQUEST_TOKEN+SECRET__KEY;*/
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(base.getBytes("UTF-8"));
StringBuilder hexString = new StringBuilder();
for (byte aHash : hash) {
String hex = Integer.toHexString(0xff & aHash);
if (hex.length() == 1) {
hexString.append('0');
}
hexString.append(hex);
}
return hexString.toString();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
4. Then for generating access token we are hitting the request token url
URL : https://api.kite.trade/session/token
headers :
request_token=XXXXXXXXXX&api_key=XXXXXXXXXXXXXXXXXX&checksum= Generated Check sum
Response I am Getting:
{"status": "error", "message": "Invalid session credentials", "error_type": "TokenException"}
some time i am getting the following error message
{
"error_type" = TokenException;
message = "Invalid checksum";
status = error;
}
Please Check This Issue.
Some time it is navigating to your webview. Please find the attached image