I have some error when consume Mendix POST API

0
I've 2 running mendix app using 2 different port (8080 and 8081) which is 8080 is my formservices and 8081 is my current mendix app that consume the api service from 8080. When I tested it with postman it's successfully created   But when using REST Service it showing the error: This what I have:    An error has occurred while handling the request. [User 'Anonymous_e19d26c1-41a6-4f49-8b34-60180400451c' with session id '245c8657-XXXX-XXXX-XXXX-XXXXXXXX5d73' and roles 'Administrator'] -------- com.mendix.webui.WebUIException: Exception while executing runtime operation    at com.mendix.webui.actions.client.RuntimeOperationAction.apply(RuntimeOperationAction.scala:72) Caused by: com.mendix.modules.microflowengine.MicroflowException: Error calling REST service    at MyFirstModule.ACT_PostData (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 MyFirstModule.ACT_PostData (CallRest : 'Call REST (POST)') Advanced stacktrace:    at com.mendix.integration.actions.microflow.RestCallAction.checkStatusCode(RestCallAction.scala:117)   and this is my REST Service:     Addition: I already try for using demo user with admin role and still can't
asked
2 answers
1

Okay, now the issue is "400: Bad Request" that means the user authentication is successful. Bad request means that the URL you are passing is incorrect. Please check it once.

For testing, you can save the URL being passed in a string attribute and check for typo errors(if any).

answered
1

The error is 401 unauthorized, It is an authentication issue.

"Login FAILED: unknown user 'Admin'."

You could try logging in with MxAdmin credentials and check the result.

answered