400: Bad Request

0
Hi all   I’m trying to call a microsoft graph POST method with the call REST service microflow tool. I have added the location, http headers and used valid json structure for the request with parameters (escaped with double “{“). It worked two times then it suddenly never worked again without me changing anything. Now I always get this error:   com.mendix.modules.microflowengine.MicroflowException: Error calling REST service at Zimmerreservation.ACT_SaveReservation (CallRest : 'Call REST (POST)') Advanced stacktrace: at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:79) Caused by: com.mendix.modules.microflowengine.MicroflowException: 400: Bad Request at Zimmerreservation.ACT_SaveReservation (CallRest : 'Call REST (POST)') This is my request tab:   (It also doesn’t work with just double opening brackets btw). Now after a moderate amount of trying I even get Error 401: Unauthorized: com.mendix.modules.microflowengine.MicroflowException: Error calling REST service at Zimmerreservation.ACT_SaveReservation (CallRest : 'Call REST (POST)') Advanced stacktrace: at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:79) Caused by: com.mendix.modules.microflowengine.MicroflowException: 401: Unauthorized at Zimmerreservation.ACT_SaveReservation (CallRest : 'Call REST (POST)') again without changing anything in comparison to when it was working still. By the way it works in Postman with the exact same configurations.   Does anybody know what to do? It’s getting frustrating   Thanks
asked
2 answers
1

Hi Lenny, 

Your error shows, that rest call failed due to the Authorization error. 

Did you passed valid API Credentials in Username and password field or valid authorization token

answered
0

In addition to Stella’s answer.

For a better use, you can use an Export Mapping instead of a custom template. With an Export Mapping, you can use the entities of your domain model.

answered