1.0.68 • Published 3 years ago

sms-toolkit v1.0.68

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years 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

3 years ago

1.0.67

3 years ago

1.0.65

3 years ago

1.0.64

3 years ago

1.0.63

3 years ago

1.0.62

3 years ago

1.0.61

3 years ago

1.0.6

3 years ago

1.0.56

3 years ago

1.0.55

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago