Invalid checksum

Kavi
We are getting {"status": "error", "message": "Invalid checksum", "error_type": "TokenException"}
We have used the below method to create Checksum
String hashableText = CLIENT_API_KEY + requestToken + CLIENT_SECRET;
return new String(DigestUtils.sha256(hashableText));

import org.apache.commons.codec.digest.DigestUtils;
to create checksum

Have used the version commons-codec:commons-codec:1.10
I have used the version "commons-codec:commons-codec:1.10" to create check sum

Please help us to solve our login problem
Tagged:
  • Kavi
    Our client is from android
  • tonystark
    tonystark edited January 2018
    You can try this function to create checksum:
     public String sha256(String str) {
    byte[] a = DigestUtils.sha256(str);
    StringBuilder sb = new StringBuilder(a.length * 2);
    for(byte b: a)
    sb.append(String.format("%02x", b));
    return sb.toString();
    }
  • sujith
    sujith edited January 2018
    Hi,
    The production version of javakiteconnect uses Unirest for HTTP calls.
    You can try the new beta version of javakiteconnect which supports android here but still the issue for getting access token exists. We will update client by next week to fix this.

    For now, you can create simple java app to get access token and then use all other methods in android app.
  • Kavi
    Thanks @tonystark and @sujith , we success fully got access token .. problem solved ..
  • Kavi
    @sujith Please let us know once your fix got released on latest javakiteconnect library.
  • sujith
    @Kavi,
    We have updated develop branch with a fix for creating checksum while requesting for the access token.
    You can use the new jar in the dist directory.
  • Kavi
    @sujith how to access new JAR file
  • sujith
    sujith edited January 2018
    You can download here.
Sign In or Register to comment.