What am I missing?
Hi Erick Narvaez,
Check out here where you can find what is missing
https://www.outsystems.com/forums/discussion/22162/set-rest-api-basic-authentication/
Hope that it helps you
Alexandre,
Maybe you are missing the "body" ... did you will that with the JSON that your REST service has to consume?
will = fill
Hi Erick,
The error message clearly says "the request body is missing". So it has nothing to do with the authentication. CreateConsumerArtifac has an input parameter BodyRequest. In Postman, this means you have to set the body to (presumably) valid JSON, like Erwin showed.
sorry everyone I forgot to place the bodys.. But..
The real problem is that, any data that Username or Password enters, the validation is correct. How can I make sure that when entering incorrect data is correct, it will be rejected?
How to reject if the authentication data is incorrect. Where do I do this validation?
https://success.outsystems.com/documentation/11/extensibility_and_integration/rest/expose_rest_apis/throw_a_custom_error_in_an_exposed_rest_api/
You have to raise an exception and think that is what you want.
You can manipulate the status code of the response if you want as well
https://success.outsystems.com/documentation/11/extensibility_and_integration/rest/expose_rest_apis/change_the_http_status_code_of_a_rest_api/
Thanks for your answer. but in this case I use Basic Authentication.
How can I relate variables in OnAuthentication with the method
Alexandre already gave you some help on that