You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Freshdesk调用Twilio API发送短信:JSON请求报21604错误求助

Fixing Twilio "To Phone Number Required" Error in Freshdesk Webhook

Hey there! Let's break down why your Freshdesk webhook is hitting that Twilio error, even though your curl command works perfectly.

The Root Cause

Your curl command uses --data-urlencode, which sends data in the application/x-www-form-urlencoded format that Twilio's Messages API expects. But when you configured Freshdesk to send a JSON payload, Twilio can't parse the To, From, and Body fields from the JSON body—this is exactly why it's complaining about a missing "To" number.

Step-by-Step Fix

Here's how to adjust your Freshdesk webhook setup to match what Twilio needs:

  • Switch the request body format: In Freshdesk's webhook settings, stop using JSON and select Form Data (or "x-www-form-urlencoded" if that's an available option).
  • Add your parameters as form fields:
    • Field name: To, Value: +19155409999
    • Field name: From, Value: +15109999999
    • Field name: Body, Value: Its Me, Its Me
  • Set up Basic Authentication: Twilio requires your Account SID and Auth Token for access. Enable Basic Auth in Freshdesk's webhook settings, use your Twilio Account SID as the username, and your Auth Token as the password (this replicates the -u flag in your curl command).
  • Confirm the Content-Type header: Ensure Freshdesk sends either application/x-www-form-urlencoded or multipart/form-data as the Content-Type header—this usually happens automatically when you select the Form Data format.

Quick Validation Tip

If you want to double-check, you can replicate this fix in Postman by switching from JSON mode to form-data mode. You’ll see it works exactly like your original curl command.

内容的提问来源于stack exchange,提问作者Terry Nichols

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 17:40:17