This file sends a test Viber message using Node and the Vonage Developer Messaging sandbox. To use it, first go to your Vonage Developer dashboard and configure your Viber sandbox.
Clone the repository to a new directory on your machine and:
- Run
npm installto add axois for making requests and 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 ID 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_ID="12345" TO_NUM="441234567890" - Run
node app.jsto send a test message
Read about how this code works on the Vonage Developer blog ☞