New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

verify-javascript-sdk

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verify-javascript-sdk

JS SDK for Nexmo Verify API

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

Nexmo Verify JS SDK

Nexmo Verify enables you to verify whether one of your end users has access to a specific phone number by challenging them with a PIN code to enter into your application or website. That PIN code is sent by Nexmo via SMS and/or TTS (Text To Speech) call.
Documentation

Install the SDK

npm install --save verify-javascript-sdk

// ES5
var NexmoVerify = require('verify-javascript-sdk');
// ES6
import 'NexmoVerify' from 'verify-javascript-sdk';

API

Initialize the client

var N = new NexmoVerify({
  appId: 'xxxxx-xxxxx-xxxxx-xxxxx',
  sharedSecret: 'xxxxxxxx'
});

Verify

.verify(parameters)
parameters is a JSON object with

NameTypeRequiredInfo
numbernumberRequiredMust be in international format (E164) example: 440201234567
countrystringOptionalGB
lgstringOptionallanguage, en-US

The callback will return an error or user status (verified, pending, failed ... )

Example

N.verify({
  number: 440201234567,
  country: 'GB', // optional
  lg: 'en-US' //optional
}).then(function(status) {
  // return the user_status
}, function(error){
  // return the error
});

Verify Check

.verifyCheck(parameters)

NameTypeRequiredInfo
numbernumberRequiredMust be in international format (E164) example: 440201234567
pin codenumberRequired4-6 digits
countrystringOptionalGB

The callback will return an error or the user status (verified, pending, failed ... )

Example

N.verifyCheck({
  number: 440201234567,
  code: 1234
}).then(function(status) {
  // return the user_status
}, function(error){
  // return the error
});

.verifySearch(parameters)

NameTypeRequiredInfo
numbernumberRequiredMust be in international format (E164) example: 440201234567
countrystringOptionalGB

The callback will return an error or the user status (verified, pending, failed ... )

Example

N.verifySearch({
  number: 440201234567,
}).then(function(status) {
  // return the user_status
}, function(error){
  // return the error
});

Verify Control

.verifyControl(parameters)

NameTypeRequiredInfo
numbernumberRequiredMust be in international format (E164) example: 440201234567
cmdstringRequiredAction: cancel, trigger_next_event
countrystringOptionalGB

The callback will return an error or the user status (verified, pending, failed ... )

Example

N.verifyControl({
  number: 440201234567,
  cmd: 'cancel'
}).then(function(status) {
  // return the user_status
}, function(error){
  // return the error
});

Verify Logout

.verifyLogout(parameters)

NameTypeRequiredInfo
numbernumberRequiredMust be in international format (E164) example: 440201234567
countrystringOptionalGB

The callback will return an error or the user status (verified, pending, failed ... )

Example

N.verifyLogout({
  number: 440201234567,
}).then(function(status) {
  // return the user_status
}, function(error){
  // return the error
});

Development

Use npm run watch to monitor for changes on src/*.js and recompile everything with Babel into lib/.

Testing

npm test

License

Copyright (c) 2015 Nexmo, Inc. All rights reserved. Licensed only under the Nexmo Verify SDK License Agreement (the "License") located at

https://www.nexmo.com/terms-use/verify-sdk/

By downloading or otherwise using our software or services, you acknowledge that you have read, understand and agree to be bound by the Nexmo Verify SDK License Agreement and Privacy Policy.

You may not use, exercise any rights with respect to or exploit this SDK, or any modifications or derivative works thereof, except in accordance with the License.

Keywords

FAQs

Package last updated on 20 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc