1.0.68 • Published 1 year ago

sms-toolkit v1.0.68

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

🔨 A toolkit of SMS verification clients for Typescript.

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.

Supported clients:

Client usage

Install the package:

yarn add sms-toolkit 

Initialize a client:

import { Truverifi, TRUVERIFI_SERVICES } from "sms-toolkit";

const client = new Truverifi(
	/* API Key */
	process.env.TRUVERIFI_API_KEY,
	/* Verification target */
	TRUVERIFI_SERVICES.GOOGLE_GMAIL
);

Start and claim a verification:

const phoneNumber = await client.startVerification();
// Receive SMS
const messages = await client.claimVerification();

Watcher usage

Initialize Watcher:

const watcher = new Watcher(client);

Wait for messages:

const newMessage = await watcher.waitForVerification();

Inspired by sms. Thank you Daniel! Created under the MIT license.

1.0.68

1 year ago

1.0.67

1 year ago

1.0.65

1 year ago

1.0.64

1 year ago

1.0.63

1 year ago

1.0.62

1 year ago

1.0.61

1 year ago

1.0.6

1 year ago

1.0.56

1 year ago

1.0.55

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago