☰
Login
Signup
Home
›
Java client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.2K
All Categories
0
Incidents
128
Node JS client
38
Go client
769
.Net API client
364
Kite Publisher
532
.Net / VBA / Excel (3rd party)
436
Algorithms and Strategies
970
Java client
1K
API clients
401
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.2K
General
In this Discussion
June 2017
sujith
Getting 404 error while implementing login kite
guna
June 2017
in
Java client
Hello kite support team I have implemented alll the steps you given
I'm getting the error 404
I have attachment screenshot of my code
Kindly advice how to resolve this
Code I wrote below
String token = str.split("request_token")[1].replaceAll("=", "");
String hashableText = ConstantStore.KITE_API_KEY + token + ConstantStore.KITE_API_SEC_KEY;
String sha256hex = CommonUtils.sha256(hashableText);
public static String sha256(String base) {
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);
}
}
@Headers("Content-Type
: application/json")
@FormUrlEncoded
@PUT("/session/token")
Call verifyUser(
@FieldMap(encoded
= true) Map params);
Tagged:
token
java
request_token
android
access_token
sujith
June 2017
Hi
@guna
,
Can you print kiteException.message and paste here?
Sign In
or
Register
to comment.
Can you print kiteException.message and paste here?