☰
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.8K
All Categories
0
Incidents
151
Node JS client
39
Go client
790
.Net API client
377
Kite Publisher
537
.Net / VBA / Excel (3rd party)
456
Algorithms and Strategies
991
Java client
1.1K
API clients
402
PHP client
4K
Python client
345
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
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?