Consuming REST API with Custom Header
Application Type


I have problem regarding consuming REST API with custom header.

Here's the scenario, when I test it on Postman it is working. See screenshot below.

And here is my custom header

But when I try on implementing it on ODC. It cannot get the same result.

I also try passing the custom header through OnBeforeRequest but I still get the same result.



According to what I understand, you are attempting to add a new parameter to the API header.

Have you tried viewing your API request's complete log? It will help you identify the true issue. 



I think the issue might be the onbeforerequest, can you try removing the onbefore request and then testing your API?

If that works then you can directly pass it in the input parameters of your API rather than doing an append in onbeforerequest.

I guess you should either add them in onbeforerequest or the API input parameters but not both.

The logs would also help in getting to know if there are multiple or duplicate headers being created by any chance.

Thanks for your insights. I already solved it but I have a new problem encountered.

On how to make the value on the OnBeforeRequest of API Dynamic. Because as of now the API is working but it is for specific data only, I want to make it dynamic because my generated key will based on what is the user's input.  Here's the link for the new problem.


I have replied on that thread let me know if that helps.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.