API Request Tool adds default Content-Type applic...
# support
c
Hi Vapi team, I have been working on integrating VAPI with our Salesforce. The API Request Tools adds the Content-Type application/json to the request header. This is causing issues while calling the Salesforce token endpoint. Is there a way to override the Content-Type. Adding a different content type in the header does not seem to help
c
Hi there, Thank you for your message. Our team is currently out of the office. We operate Monday through Friday, from 9:00 AM to 8:00 PM Pacific Standard Time (PST). We’ll get back to you as soon as possible during our normal business hours. If your message is urgent, please mark it accordingly or include “URGENT” in the subject line, and we’ll do our best to respond promptly. Warm regards, Vapi Customer Support Team
v
Thank you for sharing the details. To help troubleshoot further, could you please specify which Content-Type value you are trying to set for the Salesforce token endpoint (e.g.,
application/x-www-form-urlencoded
), and whether you are configuring it in the tool's headers section or elsewhere? This will help determine if the override is being applied as expected. Source: - [Default Tools Documentation](https://docs.vapi.ai/tools/default-tools)
v
Hey 👋 I can help you sort this out. The issue comes up because Salesforce’s token endpoint expects application/x-www-form-urlencoded, but Vapi automatically sends application/json. I can help you tweak the request setup so the right header is used and the call goes through smoothly. Just to confirm — are you making the call through the API Request Tool in your flow, or from a custom function? @ClearRTeam
c
Hi @Vercel , We would need to send the Content Type as - application/x-www-form-urlencoded to Salesforce token end point. We are trying to use the API Request Tool as this is needed across workflows. Any help to resolve this issue is much appreciated. Thank you
v
Hey 👋 sounds good, I can help you get this working with application/x-www-form-urlencoded in the API Request Tool. Since it’s something that affects a few workflows, it’d be easier to walk through it together. Let’s hop on a quick call to sort it out, Kindly let's discuss this more privately so we can set it up.
c
Thank you @Vercel , I will reach out to you separately in DM and schedule a call based on your availability and our team's availability.
To answer your question, we are trying to send application/x-www-form-urlencoded as the Content-Type using API Request Tool
c
The API request tool will automatically override the content-type as application/json because it is hardcoded, whereas the function tool will allow you to customize the header for content-type. Let us know if you need a cURL request or JSON configuration to make this possible
x
Hey - I'm running into the exact same issue do you think you could help me out too
c
Please provide the issue you are facing and the tool id