This file sends a test WhatsApp message using Node and the Vonage Developer Messaging sandbox. To use it, first go to your Vonage Developer dashboard and configure your WhatsApp sandbox.
Clone the repository to a new directory on your machine and:
- Run
npm installto add support for a.envfile - Create a new
.envfile and populate it with your credentials:Your username and password are your Vonage API key and secret. You can copy the from number from the cURL command at the bottom of the sandbox page, and the to number is the device number you've whitelisted.USERNAME="12ab3456" PASSWORD="123AbcdefghIJklM" FROM_NUM="14151234567" TO_NUM="441234567890" - Run
node app.jsto send a test message
Read about how this code works on the Vonage Developer blog ☞