Socket
Socket
Sign inDemoInstall

sinch-verification

Package Overview
Dependencies
17
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    sinch-verification

Verify mobile numbers using Sinch Verification


Version published
Weekly downloads
7
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Sinch Verification node module

Node module to make Sinch number verification requests from within Node or Web applications (using Browserify).

Additional information available on our website.

Installing

Install is straight forward using npm;

npm install sinch-verification --save

Note: Module is compatible with browserify

Include module in your project

var sinchVerification = require('sinch-verification')({
		key: 'YOUR APPLICATION_KEY', 
		secret: 'YOUR_APPLICATION_SECRET'
	});

To create a new verification session, simply call the createVerification() method as in this example:

var sinchSms = require('sinch-verification')({
		key: 'YOUR_APPLICATION_KEY', 
		secret: 'YOUR_APPLICATION_SECRET'
	}); 

var verification = sinchVerification.createVerification(number);

verification.initiate().then(function(result) {
	verification.verify(code).then(function(result) {
		console.log('Success', result);
	}).fail(function(error) {
		console.log('Failure', error);
	});
}).fail(function(error) {
	console.log('Failure initializing', error);
})

Where variables number and code contain phone number to verify and the code that was sent by SMS.

For a more complete sample, please see the provided samples.

Feedback

Questions and/or feedback on this module can be sent by contacting dev@sinch.com.

License

The MIT License (MIT)

Copyright (c) 2015 Sinch AB

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Keywords

FAQs

Last updated on 02 Oct 2015

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc