Skip to content

A simple Node.js CLI application for generating and verifying OTPs using the MSG91 SMS API. Includes resend logic, environment variable support via .env, and Docker support for easy containerized execution.

License

Notifications You must be signed in to change notification settings

Amith2410/otp-app

Repository files navigation

📲 OTP Verification CLI App using Node.js & MSG91

This is a simple command-line based OTP verification system built with Node.js, using MSG91's Flow API to send OTPs to Indian mobile numbers. It supports OTP generation, sending, verification, and resend logic.

🚀 Features

  • OTP generation (6-digit)
  • SMS delivery via MSG91
  • OTP resend option
  • CLI-based input for phone and OTP
  • Environment variable management with .env

IMG-20250807-WA0072

Untitled design

🛠 Tech Stack


📋 Example Usage

📱 Enter your phone number (with +91 or 10-digit): 9876543210 📩 OTP sent to +919876543210 🔐 Enter OTP or type 'resend': 123456 ✅ OTP Verified!

✨ Acknowledgments MSG91 – for providing the Flow-based messaging API.

Inspired by common OTP flows in mobile/web apps.

📄 License This project is licensed under the MIT License.

📦 Installation

  1. Clone the repo
git clone https://github.com/Amith2410/otp-app.git
cd otp-app


npm install
FLOW_ID=your_msg91_flow_id
AUTH_KEY=your_msg91_auth_key

node otp.js 







About

A simple Node.js CLI application for generating and verifying OTPs using the MSG91 SMS API. Includes resend logic, environment variable support via .env, and Docker support for easy containerized execution.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published