Node.js

Backend Prerequisites

In this first part, you’ll build a small Node.js backend that starts and completes a Vonage Verify API flow.

This backend will support:

  • Silent Authentication: verification happens through the mobile network when possible (no code entry).
  • SMS verification: the user receives a one-time code by SMS and types it in. Verify will fall back to SMS if Silent Authentication is not available or fails.

Important: Your Vonage credentials (JWT/private key) must live only on the backend. The mobile app will call your backend, and your backend will call Vonage.

Before You Start

Make sure you have:

  • A Vonage account.
  • Nodejs (v.14+) and npm installed (node -v and npm -v to check).
  • We'll use cURL to test the backend.