How can I use REST API authentication in Mendix?

0
First of all, I am using Mendix 8.6.0 (build 715). [the choice was not available to me in the drop down menu] I have designed an API REST service (with Bonita) to which I can perfectly connect with Postman, with the following parameters: By the way, the x-www-form-urlencoded option that is selected comes from the Content-type application/x-www-form-urlencoded header that is not displayed in my screenshot. The official Bonita specification states that this header is needed and I always get a 200-OK status code as an answer. How can I specify an equivalent request with the body part in a Mendix Call REST service in a microflow? Here is what I have so far: I guess the body part should be specified in the Request tab, but I just don't know how to do it properly. I always get the following error message for my connector, which means that, whatever I specify, the username is not taken into account: An error has occurred while handling the request. [User 'Anonymous_69a378ed-bb56-4183-ae71-c9ead783db1f' with session id '5fefb6ad-XXXX-XXXX-XXXX-XXXXXXXXb34f' and roles 'Administrator']
asked
2 answers
1

You could use a customer request template in the request tab with:
username={1}&password={2}

With 1 being the username & 2 being the password. This should get a bonita response with sessionID and Bonita Token.

answered
0

Thanks very much Maarten for your swift reply.

Nevertheless, I finally found that the proxy setting was actually the problem. It was set at the Project scope and simply clicking on “No proxy” in the “General” tab did the trick! (both services are hosted on my local machine so far)

For your information, filling in the dedicated “Authentification” field in the “HTTP Headers” is a correct way to log in my Bonita service. Maybe yours works too, but I am going to stick to something that works at the moment.

All the best.

[Could anobody click on “accepted answer” for my answer, since I cannot do it myself?]

answered