
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
verify-javascript-sdk
Advanced tools
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
npm install --save verify-javascript-sdk
// ES5
var NexmoVerify = require('verify-javascript-sdk');
// ES6
import 'NexmoVerify' from 'verify-javascript-sdk';
var N = new NexmoVerify({
appId: 'xxxxx-xxxxx-xxxxx-xxxxx',
sharedSecret: 'xxxxxxxx'
});
.verify(parameters)
parameters is a JSON object with
Name | Type | Required | Info |
---|---|---|---|
number | number | Required | Must be in international format (E164) example: 440201234567 |
country | string | Optional | GB |
lg | string | Optional | language, 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
});
.verifyCheck(parameters)
Name | Type | Required | Info |
---|---|---|---|
number | number | Required | Must be in international format (E164) example: 440201234567 |
pin code | number | Required | 4-6 digits |
country | string | Optional | GB |
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)
Name | Type | Required | Info |
---|---|---|---|
number | number | Required | Must be in international format (E164) example: 440201234567 |
country | string | Optional | GB |
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
});
.verifyControl(parameters)
Name | Type | Required | Info |
---|---|---|---|
number | number | Required | Must be in international format (E164) example: 440201234567 |
cmd | string | Required | Action: cancel , trigger_next_event |
country | string | Optional | GB |
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
});
.verifyLogout(parameters)
Name | Type | Required | Info |
---|---|---|---|
number | number | Required | Must be in international format (E164) example: 440201234567 |
country | string | Optional | GB |
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
});
Use npm run watch
to monitor for changes on src/*.js
and recompile everything with Babel into lib/
.
npm test
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.
FAQs
JS SDK for Nexmo Verify API
The npm package verify-javascript-sdk receives a total of 0 weekly downloads. As such, verify-javascript-sdk popularity was classified as not popular.
We found that verify-javascript-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.