API header error
I'm trying to make an API call to OpenAI's list messages API.
I keep getting the error saying I must provide the header, which I did in the test. There are no options in the node to place the header.
Solution:Jump to solution
Hi @Ada, does the API header requires a special key or is it just a simple Authorization hearder? If it requires a special key, then you'll be require to modify the code logic a bit before providing the custom header directly to make this work.
Consider this example of Rapid API with custom header:
You can add the key and host directly like this by modifying the headers in the code of the API call node. Ensure to pass their values in the export params and node fields too to make it work.
...
3 Replies
Solution
Hi @Ada, does the API header requires a special key or is it just a simple Authorization hearder? If it requires a special key, then you'll be require to modify the code logic a bit before providing the custom header directly to make this work.
Consider this example of Rapid API with custom header:
You can add the key and host directly like this by modifying the headers in the code of the API call node. Ensure to pass their values in the export params and node fields too to make it work.
https://discord.com/channels/853498675484819476/1197552314974740531/1197892254552035369
@Gaurav Chadha The header is supposed to look like this screenshot.
if i add the header to the code directly, how do I add the API key in?
also how come the headers tab in the test button didn't work?