Authy.com API wrapper for Node.js
You can install this module from Github, but can be unstable:
git clone https://github.com/fvdm/nodejs-authy npm install ./nodejs-authy
Or from the NPM registry, which is always the latest stable release:
npm install authy-node
You need to signup at Authy and create an app in your Dashboard. Once done take note of the two different app tokens. The one on the left is for real production use, the other on the right is only for safe testing.
var authy =authyapimode = 'sandbox'authyapitoken = 'abc123def456'
When you switch to production make sure to set
api.token to your production token!
Each method requires a callback function, like this:
In case of an error:
err is an instance of
Error, sometimes with additional properties to help with tracing the problem.
When everything is good:
err is null and
res is an
object with the API's response.
Register a new user to your app.
email user's email address phone user's cellphone number country user's country code for cell
Delete a user from your app.
userId user's Authy ID, from .register()
Verify an authentication token your app received from the user.
userId user's Authy ID, from .register() token user's token, from Authy or SMS force force verification
Send authentication token by SMS.
userId user's Authy ID, from .register() force send SMS even when user has smartphone.
authy.sms( 123, true, myCallback )
Get basic information about your API token.
Get monthly statistics about your API token.
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
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 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.
For more information, please refer to http://unlicense.org