Signature

hello! I started to learn how to connect rapyd, and I didn’t success with signature. For trying I use:
var http_method = “get”;
var base_url = “https://sandboxapi.rapyd.net”;
var path = “/v1/data/countries”;

    var to_sign = http_method + path + salt + timestamp + accessKey + secretKey + "";
    String sha256hex = Hashing.sha256()
            .hashString(to_sign, StandardCharsets.UTF_8)
            .toString();

    String encode = BaseEncoding.base64()
            .encode(sha256hex.getBytes());

    
    headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));
    headers.add("access_key",ACCESS_KEY);
    headers.add("salt",salt);
    headers.add("timestamp", String.valueOf(Instant.now().getEpochSecond()));
    headers.add("signature", encode);

    HttpEntity<String> entity = new HttpEntity<>(headers);

    System.err.println(encode);

    ResponseEntity<String> response = restTemplate.exchange(
            base_url+path, HttpMethod.GET, entity, String.class);

and I get a responce: Add authentication headers.",“response_code”:“MISSING_AUTHENTICATION_HEADERS”

the code from tutorial(java) is not working… I tried to connect with bot, but for while any answer… Please, help me, I really need

Hi, Anastasiya - Where did you find this tutorial? You might find the API Reference more useful. There are code samples in 6 languages on this page: Request Signatures.

Hi Charles! Thank you for replaying. The code from method in this example in the tutorial is not working. It has a mistake hmacDigest(String msg, String keyString, String algo), because in main, you pass 2 values, not 3. And its unclear