# Error 401 in flowable-rest

**URL:** <https://forum.flowable.org/t/error-401-in-flowable-rest/4963>\
**Category:** Flowable Application\
**Created:** [November 27, 2019, 12:35am UTC](https://forum.flowable.org/t/error-401-in-flowable-rest/4963 "2019-11-27T00:35:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![luiangper](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@luiangper](https://forum.flowable.org/u/luiangper)\
**Post date:** [November 27, 2019, 12:35am UTC](https://forum.flowable.org/t/error-401-in-flowable-rest/4963/1 "2019-11-27T00:35:07Z")

</div>

I’ve configured my flowable engine to work with encoded passwords (flowable.idm.password-encoder=spring\_bcrypt) and now all the passwords in my DB are hashed, ok, so far so good…my problem is when I try to access to flowable-rest using my literal password, flowable-rest is returning a 401 error.

Have I missed any configuration in the flowable-rest module?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [December 5, 2019, 7:44am UTC](https://forum.flowable.org/t/error-401-in-flowable-rest/4963/2 "2019-12-05T07:44:05Z")

</div>

Are you sure that you are using the correct password?

How did you set the literal password for `flowable-rest`?

---

<div class="post-metadata">

**Author:** ![luiangper](https://avatars.discourse-cdn.com/v4/letter/l/8e8cbc/32.png) [@luiangper](https://forum.flowable.org/u/luiangper)\
**Post date:** [December 9, 2019, 1:19pm UTC](https://forum.flowable.org/t/error-401-in-flowable-rest/4963/3 "2019-12-09T13:19:22Z")

</div>

I am setting the user and the password as a parameter, the password is not encoded.

```
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
        headers.setAccept(Arrays.asList(MediaType.APPLICATION_JSON));

        MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();
        params.add("j_username", serverFlowableUsername);
        params.add("j_password", serverFlowablePassword);
        params.add("_spring_security_remember_me", "true");
        params.add("submit", "Login");

        HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(params, headers);

        ResponseEntity<?> response = flowableApacheRestTemplate.exchange(urlOverHttps, HttpMethod.POST, request, String.class);

        String cookie = "";
        if (response.getHeaders().get("Set-Cookie").size() == 1)
        {
            cookie = response.getHeaders().get("Set-Cookie").get(0);
        }
        return cookie;
```

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [December 9, 2019, 2:39pm UTC](https://forum.flowable.org/t/error-401-in-flowable-rest/4963/4 "2019-12-09T14:39:58Z")

</div>

Are you using some of the given Flowable UI or REST Applications, or are you creating your own application that has the flowable-rest API?
