Reputation: 11
I tried to send Whatsapp message through Twilio
const accountSid = 'AC4fcb197075xxxxxxxcccccccvvvvvvvvv';
const authToken = 'fedd7f35082ccccccccccc49cxxxxxxxxxxx';
const client = require('twilio')(accountSid, authToken);
client.messages.create({
body: 'This is the ship that made the Kessel Run in fourteenparsecs',
from: '+15yyy61xxx',
to: '+91mmm911kkk7'
}).then(message => console.log(message.sid));
Message SID is logged to console but in Twilio Debugger, following error codes are found
Upvotes: 1
Views: 3125
Reputation: 156
I manage the WhatsApp team at Twilio -- happy to help!
Chenna's comments are correct. With WhatsApp, your to and from values would be prefixed with "whatsapp:".
To use WhatsApp with Twilio's Programmable Messaging API, you'll have to do one of two things first:
If you need any more help, feel free to reach out to Twilio Support!
Upvotes: 8