This package provides simple wrappers for the usage of SMS verification clients in Node.js.
Included is Watcher
, a simple tool to wait for and match received messages.
- Truverifi
- Textverified coming soon
- SMSPVA coming soon
yarn add sms-toolkit
import { Truverifi, TRUVERIFI_SERVICES } from "sms-toolkit";
const client = new Truverifi(
/* API Key */
process.env.TRUVERIFI_API_KEY,
/* Verification target */
TRUVERIFI_SERVICES.GOOGLE_GMAIL
);
const phoneNumber = await client.startVerification();
// Receive SMS
const messages = await client.claimVerification();
const watcher = new Watcher(client);
const newMessage = await watcher.waitForVerification();
Inspired by sms. Created under the MIT license.