Hello,
I am trying to send a post request using the Request API to our custom Middleware API. When I do I receive a response with a 400 error “Error while substituting the templates”.
I have tried all the possible solutions found in the community but still getting the same response
Code Snippet
var headers = {
"Authorization": 'Bearer <%= access_token %>',
"Content-Type": "application/json"
};
var options = { headers: headers, body: JSON.stringify(user), isOAuth : true };
var url = MIDDLEWARE_URL + "/addUser";
client.request.post(url, options)
.then(
function (response) {console.log(response)}
, err => console.log(err))
Any advice would be greatly appreciated
Thank You.