public String authToken(String projectKeyId, String variableName, String secretKey, String keyArray) throws Exception {
String message = "ai="+projectKeyId+"&"+variableName+"="+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);