- Symptom
- Error: accountSid must start with ACThe given SID indicates an API Key which requires the accountSid to be passed as an additional option
- 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 });- Affected
- twilio-node 3.x through 6.2.0, current in October 2026
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders