SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How to Make a Voice WhatsApp Call using Node.js

Objective

The following sample code below shows the basic Node.js syntax of <Dial><WhatsApp>

 

Procedure 

This is helpful in case you need to make a WhatsApp Call from a Twilio Function: 

const VoiceResponse = require('twilio').twiml.VoiceResponse;


const response = new VoiceResponse();
const dial = response.dial({
    callerId: 'whatsapp:+558551234567'
});
dial.whatsApp('+15558675310');

console.log(response.toString()); 

 

Additional Information 

Further details about WhatsApp Voice Call can be found in the following document: TwiML™ Voice: <WhatsApp>

 

 

 

 

Have more questions? Submit a request
Powered by Zendesk