Skip to content

Instantly share code, notes, and snippets.

@Krishprajapati15
Created June 24, 2025 10:57
Show Gist options
  • Select an option

  • Save Krishprajapati15/108d4b932b97c652f361fd095d0a2437 to your computer and use it in GitHub Desktop.

Select an option

Save Krishprajapati15/108d4b932b97c652f361fd095d0a2437 to your computer and use it in GitHub Desktop.
Vonage (formerly Nexmo) offers a powerful, flexible suite of APIs that enable developers to add real-time communication—voice, video, messaging, and more—into any application. With global reach and robust reliability, Vonage’s platform is trusted by businesses of all sizes for scalable customer engagement, two-factor authentication, notification…

Vonage: The All-in-One API Platform for Communication

Vonage (formerly Nexmo) offers a powerful, flexible suite of APIs that enable developers to add real-time communication—voice, video, messaging, and more—into any application. With global reach and robust reliability, Vonage’s platform is trusted by businesses of all sizes for scalable customer engagement, two-factor authentication, notifications, and more.


🚀 Key Features

  • SMS, Voice, and Video APIs – Send SMS globally, make/receive phone calls, and embed live video with just a few lines of code.
  • Messaging APIs – Integrate with WhatsApp, Facebook Messenger, Viber, MMS, and more.
  • Number Insight – Instantly validate and enrich phone numbers for fraud prevention and better user experience.
  • Verify API – Simple, secure two-factor authentication (2FA) via SMS, voice, or branded messages.
  • Conversations API – Build multi-channel, persistent conversations with a unified API.
  • WebSockets and SIP – Advanced features for integrating with VoIP systems and real-time apps.
  • Global Scalability & Reliability – Enterprise-grade platform with coverage in 190+ countries, high uptime, and compliance.

🛠️ How to Use Vonage APIs

  1. Sign Up & Get API Keys

    • Create a free account at dashboard.nexmo.com.
    • Get your API key and secret from the dashboard.
  2. Install the SDK

    • Vonage provides official SDKs for Node.js, Python, Java, PHP, .NET, and more.
    • Example for Node.js:
      npm install @vonage/server-sdk
  3. Send an SMS Example (Node.js)

    const { Vonage } = require('@vonage/server-sdk');
    
    const vonage = new Vonage({
      apiKey: process.env.VONAGE_API_KEY,
      apiSecret: process.env.VONAGE_API_SECRET
    });
    
    vonage.sms.send({
      to: "RECIPIENT_NUMBER",
      from: "VonageAPI",
      text: "Hello from Vonage SMS API!"
    })
    .then(resp => console.log(resp))
    .catch(err => console.error(err));
  4. Add Voice Calling

    • Make outbound or receive inbound calls, record calls, connect to SIP endpoints, and more.
    • Example: Voice API Quickstart
  5. Enable Two-Factor Authentication

    • Use the Verify API to send OTPs for login or sensitive actions.
  6. Use Webhooks

    • Set up publicly accessible endpoints to handle delivery reports, inbound messages, and call events.

💡 When to Use Vonage

  • Transactional SMS: Send alerts, reminders, or OTPs worldwide.
  • Customer Support: Add voice or video calls to your app for seamless support.
  • Multi-channel Messaging: Engage users on their favorite chat apps.
  • User Verification: Add simple, secure 2FA to protect user accounts.
  • Global Communication: Expand your app’s reach with reliable SMS and voice in 190+ countries.
  • Real-Time Collaboration: Build chat, video, and conversation features for your SaaS or platform.

🖥️ Example: Verifying a User with Verify API (Node.js)

const { Vonage } = require('@vonage/server-sdk');

const vonage = new Vonage({
  apiKey: process.env.VONAGE_API_KEY,
  apiSecret: process.env.VONAGE_API_SECRET
});

vonage.verify.start({
  number: "RECIPIENT_NUMBER",
  brand: "YourApp"
})
.then(resp => console.log(resp))
.catch(err => console.error(err));

📚 Resources


Learn more at vonage.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment