thisisbuze
thisisbuze2y ago

Adding Additional Headers to API Call node

I have an API that I am integrating that requires an additional value in the header other than Authorization and Content-Type. How can I add an additional header value into the API Call node? I tried using the Edit with AI feature but it just hangs indefinitely. Side note: all Edit with AI's never actually complete for me. I have let run for 20-30 minutes and they never complete :(.
No description
6 Replies
Gaurav Chadha
Gaurav Chadha2y ago
Hi @thisisbuze, you can modify the code like this to include more headers:
No description
Gaurav Chadha
Gaurav Chadha2y ago
For the AI issue, we are tracking this and will update you on fix.
richard.roseboom
@Gaurav Chadha This was helpful to me too, but I'm wondering how to even get a session cookie in the first place to send. I've asked more here https://discord.com/channels/853498675484819476/1203625807117819964
RFA
RFA3mo ago
@Gaurav Chadha Any update on additional headers in UI?
AI Support
AI Support3mo ago
Processing...
🤖 Tuning in to the data frequencies. 📡 this might take a couple of minutes... beep boop
AI Support
AI Support3mo ago
🤖 AI Response
BuildShip allows you to add custom request headers in both the REST API Call trigger and the API Call node. For the REST API Call trigger, you can specify additional headers by navigating to the Request Headers section in the trigger configuration. Here, you use the "+" icon to add new headers, providing a key (such as "Authorization" or "X-API-KEY") and setting the type to string. Labels and descriptions are for documentation purposes only and do not affect the header values. This setup is useful for scenarios like BYOK (Bring Your Own Key) systems, where you might need to include an Authorization header containing an API key. For outgoing API requests using the API Call node, you can also set custom headers directly in the node logic. This is done by modifying the headers object in the node’s configuration, ensuring that required headers (like "accept: application/json" or "X-API-KEY") are included. The values for these headers should be passed in the export params and node fields to ensure they are correctly transmitted with the request. Additionally, BuildShip provides documentation and tutorials on securing API endpoints, including how to check for specific headers (such as bearer tokens) in incoming requests using the "get request headers" node. This allows you to implement authentication and other header-based logic as needed. 🔗 References: 1. https://docs.buildship.com/triggers-rest-api/rest-api 2. https://support.buildship.com/m/1242254351787888680 3. https://support.buildship.com/m/1275761048925765664 4. https://buildship.com/blog/secure-api-point-with-low-code 5. https://support.buildship.com/m/1369745528904093787
BuildShip AI Support

Did you find this page helpful?