How to send application/x-www-form-urlencoded with Function/API Request Tools?
Hi VAPI team,
I'm trying to integrate Twilio Verify API which requires
WHAT I NEED TO SEND:
POST https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications
Content-Type: application/x-www-form-urlencoded
Body: To=+13417668501&Channel=sms
WHAT I'VE TRIED:
Any guidance would be greatly appreciated!
I'm trying to integrate Twilio Verify API which requires
application/x-www-form-urlencoded format for POST requests, but I'm having trouble with VAPI tools.WHAT I NEED TO SEND:
POST https://verify.twilio.com/v2/Services/{ServiceSid}/Verifications
Content-Type: application/x-www-form-urlencoded
Body: To=+13417668501&Channel=sms
WHAT I'VE TRIED:
- API Request Tool:
- Set Content-Type header to application/x-www-form-urlencoded
- Configured body properties (To, Channel)
- Result: Twilio returns error 20001 "Missing required parameters"
- The body data isn't being sent
- Found this Discord thread saying API Request tools are hardcoded to JSON:https://discord.com/channels/.../API-Request-Tool-adds-default-Content-TypeKyle mentioned "function tool will allow you to customize the header"
- Function Tool:
- Added Content-Type: application/x-www-form-urlencoded header
- Configured parameters (To, Channel)
- Result: "No result returned" error
- Seems Function Tools expect to call my server, not external APIs?
- Is it possible to send form-encoded POST requests directly to external APIs with VAPI tools?
- If yes, what's the correct configuration?
- If no, do I need to create a backend proxy that reformats the request?
Any guidance would be greatly appreciated!
Discord
Discord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.
