Loading [Contrib]/a11y/accessibility-menu.js
Back
Close

Send & Recieve SMS messages in Node.JS using Nexmo

SiDarthVader
2,568 views
Previous: Send a SMS

Receive an SMS

Enter your apiKey & apiSecret below. Then, press 'Run My Code' to spin up the server. Copy the source of the viewer below and enter it as the Webhook URL for Inbound Messages on the Nexmo dashboard.

Listen for incoming SMS messages
const Nexmo = require('nexmo'); //nexmo node lib
const express = require('express'); //expressJS (server)
const bodyParser = require('body-parser'); //body parser to parse the incoming http request
const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
//initialize nexmo client w/ your apikey & secret
const nexmo = new Nexmo({
apiKey: "",
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants