Ada
Ada4mo ago

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.
No description
No description
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. ...
No description
Jump to solution
3 Replies
Solution
Gaurav Chadha
Gaurav Chadha4mo ago
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
No description
Ada
Ada4mo ago
@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?
No description
Ada
Ada4mo ago
also how come the headers tab in the test button didn't work?