# Signature

**URL:** <https://community.rapyd.net/t/signature/1285>\
**Category:** 🙋🏽‍♀️🙋🏽‍♂️ Ask Questions\
**Tags:** get-started\
**Created:** [November 10, 2021, 8:45pm UTC](https://community.rapyd.net/t/signature/1285 "2021-11-10T20:45:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anastasiya\_Sevastian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/anastasiya_sevastian/32/904_2.png) [@Anastasiya\_Sevastian](https://community.rapyd.net/u/Anastasiya_Sevastian)\
**Post date:** [November 10, 2021, 8:45pm UTC](https://community.rapyd.net/t/signature/1285/1 "2021-11-10T20:45:31Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![CharlesDorsett](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/charlesdorsett/32/47_2.png) [@CharlesDorsett](https://community.rapyd.net/u/CharlesDorsett)\
**Post date:** [November 11, 2021, 9:38am UTC](https://community.rapyd.net/t/signature/1285/2 "2021-11-11T09:38:09Z")

</div>

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](https://docs.rapyd.net/build-with-rapyd/reference/message-security#request-signatures).

---

<div class="post-metadata">

**Author:** ![Anastasiya\_Sevastian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.rapyd.net/anastasiya_sevastian/32/904_2.png) [@Anastasiya\_Sevastian](https://community.rapyd.net/u/Anastasiya_Sevastian)\
**Post date:** [November 12, 2021, 4:47am UTC](https://community.rapyd.net/t/signature/1285/3 "2021-11-12T04:47:46Z")

</div>

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
