
Or you can use their 2FA authentication products (Nexmo - Verify or Twilio - Authy that should help simplify this workflow.

#NODEJS SEND SMS FREE HOW TO#
User enters their phone number in a form and submits to your app Sending an SMS Message Using Node.js To demonstrate how to use the Node.js SDK, let’s run the example code snippet that sends an SMS message.

With these services you can either build your own verification (2FA - Two Factor Authentication) workflow: If this is your first time using Plivo APIs, follow our instructions to set up a Node.js development environment. Prerequisites To send sms with Node JS, you need a Plivo account sign up with your work email address if you don’t have one already. npm init Accept the defaults for the application. Set up your Node.js application Once your free Sinch account is setup and you have a virtual number, create a new node app with npm.

To ensure you can reach a users mobile no matter their location and network it's likely you're going to have to look at a paid service such as Nexmo (who I work for) or Twilio. You can use it write Node.js applications that send and receive SMS messages. Quickly send SMS messages in a Node.js application with the Sinch SMS API.
