New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

sms-otp-using-myphone

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sms-otp-using-myphone

Twilio Verify alternative for developers. Send and verify SMS OTP codes from your own phone — no Twilio, no Vonage Verify, no MessageBird. No per-OTP fee, no markups, no A2P 10DLC. CLI for 2FA, phone verification, login flows, CI tests. Free 5-day trial a

latest
Source
npmnpm
Version
1.3.0
Version published
Weekly downloads
34
-83.25%
Maintainers
1
Weekly downloads
 
Created
Source

sms-otp-using-myphone — send and verify SMS OTP codes using your own phone

npm version npm downloads Node 18+ License: MIT

Send SMS OTP codes using your own phone. No Twilio. No Vonage. No per-OTP fee. Pair your Android phone with the SMS8 cloud and generate, send, and verify one-time codes from any script, server, CI job, or AI agent.

npx sms-otp-using-myphone send +14155550100
# → 6-digit code arrives via your real phone number

Why use your own phone for SMS OTP

CPaaS providers (Twilio Verify, Vonage Verify, MessageBird Verify) charge $0.05 to $0.10 per OTP attempt and require A2P 10DLC registration in the US. At any meaningful signup volume that's hundreds of dollars per month before you've shipped a single feature.

This package routes OTP SMS through the Android phone you already own:

  • Codes arrive from your real phone number — recipients trust the sender
  • $29/month flat unlimited instead of per-OTP fees
  • No A2P 10DLC paperwork — these are P2P SMS from a real SIM
  • Built-in OTP store — server tracks code, expiry, attempts, resend cooldown
  • wait command — block until the next code arrives on your test SIM

Install

# One-off
npx sms-otp-using-myphone send +14155550100

# Or install globally
npm install -g sms-otp-using-myphone
sms-otp send +14155550100

Node 18 or newer.

Quick start

  • Sign up free at sms8.io (5-day trial, no card)
  • Pair an Android phone via the SMS8 app
  • Grab your API key from app.sms8.io/api.php
  • Set the key once:
    export SMS8_API_KEY=sk_xxx
    

Send / verify / wait

# Send a code (defaults: 6 digits, 5 min expiry, 5 attempts, 60s resend cooldown)
sms-otp-using-myphone otp send +14155550100

# Verify a code the user typed in
sms-otp-using-myphone otp verify +14155550100 482937
# → { "verified": true }

# Block until an SMS code arrives on a paired Android (handy in tests)
# Pass the sender phone (or partial match) — e.g. the bank or Google
CODE=$(sms-otp-using-myphone otp wait +Google --contains="Google" --timeout=180)
echo "Got: $CODE"

The shorter alias sms-otp works for every command shown above (e.g. sms-otp otp send +1234).

OTP send options

Tune length, expiry, template, and attempt limit at send time:

sms-otp-using-myphone otp send +14155550100 --length=8 --expires-in=180
sms-otp-using-myphone otp send +14155550100 --template="Your YourApp code: {code}"
sms-otp-using-myphone otp send +14155550100 --max-attempts=3

Route through a specific device or SIM

By default SMS8 sends through your primary paired Android. To pin a specific phone or SIM slot (dual-SIM Androids), or to broadcast:

sms-otp-using-myphone otp send +14155550100 --device-id=10700
sms-otp-using-myphone otp send +14155550100 --device-id=10700 --sim-slot=2
sms-otp-using-myphone otp send +14155550100 --devices=10700,10701|0
sms-otp-using-myphone otp send +14155550100 --option=1     # broadcast all devices
sms-otp-using-myphone otp send +14155550100 --option=2     # broadcast all SIMs
sms-otp-using-myphone otp send +14155550100 --random-device

The same routing flags work on otp wait (which Android device & SIM should watch for the incoming code). Run sms-otp-using-myphone devices to list device IDs.

otp verify does not take routing flags — the code lives server-side, not on a SIM.

Example: end-to-end login flow

#!/usr/bin/env bash
read -p "Phone (E.164): " PHONE
sms-otp-using-myphone otp send "$PHONE"
read -p "Code: " CODE
if sms-otp-using-myphone otp verify "$PHONE" "$CODE" | grep -q '"verified": true'; then
  echo "Welcome!"
else
  echo "Wrong code. Try again."
fi

Example: CI signup test

# Trigger your app to send an OTP
curl -X POST https://staging.your-app.com/otp -d 'phone=+14155550100'

# Block until the code arrives on the test SIM (max 3 minutes)
CODE=$(sms-otp-using-myphone wait +14155550100 --timeout=180)

# Submit it to your app
curl -X POST https://staging.your-app.com/verify -d "phone=+14155550100&code=$CODE"

Defaults

SettingDefault
Code length6 digits
Expiry5 minutes
Max attempts5
Resend cooldown60 seconds
Per-phone cap5 OTPs per 24 h

Configurable via the API. See the OTP API docs.

Pairs nicely with

  • sms8-cli — full SMS + OTP CLI (same backend)
  • sms8-mcp — let Claude / Cursor / Windsurf send OTPs through your AI agent
  • phone-sms-gateway — phone-as-gateway brand

License

MIT

Keywords

sms-otp

FAQs

Package last updated on 19 Sep 2026

Related posts