npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cordova-plugin-sms-otp-send

v1.1.0

Published

Cordova plugin to send SMS and send/verify OTP codes from iOS and Android — a free Twilio Verify alternative. Routes through your own paired Android phone via SMS8. Native iOS Swift + Android Kotlin bridges. No per-OTP fees, no markups. Free 5-day trial a

Readme

cordova-plugin-sms-otp-send — SMS + OTP for Cordova / Ionic, a free Twilio Verify alternative

npm version npm downloads Cordova 10+ License: MIT

Cordova plugin for Ionic / Cordova apps to send SMS and send/verify OTP codes on iOS and Android — through your own paired Android phone. No Twilio, no Vonage Verify, no MessageBird. No per-OTP fees, no markups, no A2P 10DLC. Free 5-day trial at sms8.io.

await SmsOtp.configure({ apiKey: 'sk_xxx' });
await SmsOtp.sendOtp({ phone: '+14155550100' });
const { verified } = await SmsOtp.verifyOtp({ phone: '+14155550100', code: '482937' });

For Capacitor apps (the modern Ionic stack), use capacitor-sms-otp-send-verify.


Install

cordova plugin add cordova-plugin-sms-otp-send

Or for Ionic Cordova projects:

ionic cordova plugin add cordova-plugin-sms-otp-send

The plugin's iOS Swift + Android Kotlin native code compiles into your app automatically.

Quick start

1. Get a free API key

  1. Sign up at sms8.io — 5-day trial, no card
  2. Install the SMS8 Android app, pair your phone
  3. Copy your API key from app.sms8.io/api.php

2. Configure once at app boot

document.addEventListener('deviceready', async () => {
  await SmsOtp.configure({ apiKey: 'sk_xxx' });
}, false);

Production: never embed your master API key in the app bundle. Proxy through your backend.

3. Send + verify

async function loginFlow(phone) {
  await SmsOtp.sendOtp({ phone, length: 6 });
  const code = await promptUserForCode();
  const result = await SmsOtp.verifyOtp({ phone, code });
  if (result.verified) {
    navigateTo('home');
  } else {
    alert('Wrong code. Attempts left: ' + result.attemptsLeft);
  }
}

4. Plain SMS

await SmsOtp.sendSms({ phone: '+14155550100', message: 'Order shipped!' });

API

SmsOtp.configure({ apiKey, baseUrl? }): Promise<void>

Must be called once before any send/verify.

SmsOtp.sendSms({ phone, message, deviceId?, simSlot? }): Promise<{ success, messageId, error }>

Send a plain SMS through your paired Android phone.

SmsOtp.sendOtp({ phone, length?, template?, expiresIn?, maxAttempts?, deviceId?, simSlot? }): Promise<{ success, otpId, phone, expiresAt, expiresIn, error }>

Send a verification code. Defaults: 6 digits, 5-minute expiry, 5 attempts allowed.

SmsOtp.verifyOtp({ phone, code }): Promise<{ success, verified, error, attemptsLeft }>

Verify the code the user typed.

iOS SMS auto-fill

When your Ionic UI uses standard HTML inputs with these attributes, iOS shows the "From Messages" suggestion above the keyboard automatically:

<input type="text"
       inputmode="numeric"
       autocomplete="one-time-code"
       maxlength="6"
       pattern="[0-9]*" />

No extra plugin call needed — the attributes do the work.

How it works

  1. JS calls SmsOtp.sendOtp (or sendSms, verifyOtp)
  2. Cordova bridge routes to native iOS Swift or Android Kotlin
  3. Native code POSTs to https://mcp.sms8.io with your API key
  4. SMS8 queues the message; your paired Android phone polls, sends via its real SIM, reports back

Typical round-trip: under 4 seconds.

Why this instead of Twilio Verify?

| | Twilio Verify / Vonage Verify | This plugin | |---|---|---| | Per-OTP cost | $0.05 – $0.10 | $0 (flat $29/mo unlimited) | | A2P 10DLC paperwork | Required in the US | Not required — P2P from real SIM | | Sender ID | Short code / random LCN | Your real mobile number | | Free trial | None | 5 days unlimited, no card |

Related packages

Links

License

MIT