0.0.2 • Published 8 years ago

authjet v0.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

AuthJet

Dead simple SMS user verification. For more details and to sign up, go to AuthJet.com.

Installation

npm install --save authjet

API

const AuthJet = require('authjet');
const authjet = AuthJet('USERNAME', 'PASSWORD');

// check if login credentials are valid
authjet.checkAuth()
	.then(({authenticated}) => {
		// your logic here
	});

// get the balance of your account
authjet.balance()
	.then(({messagesPaid, messagesSent, messagesAvail}) => {
		// your logic here
	});


const recipient = '19498675309'; // 10 digit phone number with preceeding "1"
const appId = 'aHc9s'; // unique ID found in your account

// send code to recipient (https://authjet.com/docs/send)
authjet.send(appId, recipient)
	.then(({code, expires}) => {
		// your logic here
	});

// validate challenge code (https://authjet.com/docs/validate)
const challenge = '8865';
authjet.validate(recipient, challenge)
	.then(({valid, reason}) => {
		//your logic here
	});
0.0.2

8 years ago

0.0.1

8 years ago