Messaging Everywhere With Node.js
The Vonage Messages API Sandbox allows developers to test communication channels such as WhatsApp, Viber, and Facebook Messenger for their organization before adding them to production. The sandbox has slight differences compared to the regular Vonage Messages API, and it's recommended to create a server to send messages from any channel in both the sandbox and production environments. To get started, developers need to set up a new project with Node.js, Nexmo Node SDK, Express, body-parser, and dotenv packages. They also need to create a Vonage API account and obtain an application ID, private key, and API keys for each channel. The example code uses Glitch's default Express server setup and creates two nearly identical clients for the sandbox and production environments. One client is used for sending messages in the sandbox, while another client is used for sending messages in production when a specific method is selected. The server handles form submissions from the client-side interface, which sends messages to the selected channel using one of the clients. Once verified, developers can adapt this code to set up testing with the Vonage Messages API Sandbox for their application's logic.
Company
Vonage
Date published
May 5, 2021
Author(s)
Garann Means
Word count
1457
Language
English
Hacker News points
None found.