public String authToken(String projectKeyId, String secretKey, String keyArray) throws Exception {
String message = "ai="+projectKeyId+"&cs="+keyArray;
Mac hmac = Mac.getInstance("HmacSHA256");
hmac.init(new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256"));
byte[] signature = hmac.doFinal(message.getBytes("UTF-8"));
return Hex.encodeHexString(signature);