Twilio · sdk · fg-0165
Twilio client throws 'accountSid must start with AC' when created with an API key
Error: accountSid must start with AC
Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100
Cause
The helper treats its first argument as both the username and the account SID unless an accountSid option is given. An API key SID starts with SK, so validation fails.
Fix
Pass the key SID and secret as the first two arguments and the real account SID in the options object.
Apply
const client = twilio(process.env.TWILIO_API_KEY_SID, process.env.TWILIO_API_KEY_SECRET, { accountSid: process.env.TWILIO_ACCOUNT_SID });Affects: twilio-node 3.x through 6.2.0, current in October 2026
Sources
- https://github.com/twilio/twilio-node/issues/600
- https://github.com/twilio/twilio-node/blob/main/src/base/BaseTwilio.ts
Have your agent know this before it fails
claude mcp add --transport http footgun https://getfootgun.com/api/mcp