{"_id":"nexmo","_rev":"82-a06ef8b2279e9b715ab0cbdb2dd854af","name":"nexmo","dist-tags":{"alpha":"1.2.0-alpha","beta":"2.7.0-beta-1","latest":"2.9.1"},"versions":{"0.0.1":{"name":"nexmo","version":"0.0.1","keywords":["nexmo","sms"],"author":{"name":"Paul O'Fallon","email":"paul@ofallonfamily.com"},"_id":"nexmo@0.0.1","maintainers":[{"name":"pofallon","email":"paul@ofallonfamily.com"}],"homepage":"https://github.com/pofallon/node-nexmo","dist":{"shasum":"5c8b94203fc9f65e25c5e0ee9634b45a34271342","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-0.0.1.tgz","integrity":"sha512-Yqx0UlFocu24q7xzZlWiakXFIv2wRafGN7TiXZWVdvntqEKnGFzv3MG+HRAgZJfkgPl9LUzlM60ATG5UuXX0GQ==","signatures":[{"sig":"MEQCIDLsSmFS4DJHhAlS7yjxX4hmMqeTAhdwiswZkLHO4tzTAiAw9y4s5VxgEgR0YJ1tmMTcUnb/Qk5mIAvoQpeclLYc/w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","files":["index.js","lib","package.json","README.md","test"],"engine":"node >= 0.4.1","engines":{"node":"*"},"_npmUser":{"name":"pofallon","email":"paul@ofallonfamily.com"},"_npmVersion":"1.0.106","description":"A node.js library for accessing the Nexmo REST API","directories":{},"_nodeVersion":"v0.6.1-pre","dependencies":{"request":"2.2.x"},"_defaultsLoaded":true,"devDependencies":{"nodeunit":"0.5.x"},"_engineSupported":true,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"nexmo","version":"0.0.2","keywords":["nexmo","sms"],"author":{"name":"Paul O'Fallon","email":"paul@ofallonfamily.com"},"_id":"nexmo@0.0.2","maintainers":[{"name":"pofallon","email":"paul@ofallonfamily.com"}],"homepage":"https://github.com/pofallon/node-nexmo","dist":{"shasum":"a72e3935e2de45b3a99d79f763bfb324bc1fcf2b","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-0.0.2.tgz","integrity":"sha512-MdFqlcROw+4e3i4EpCZ3mPKU0rXN6qH6wOFAuB4IuCLTQE28Um0yDvYyK3klK2WuZ4E1wk39pMcN5CV8EY/66Q==","signatures":[{"sig":"MEUCIQDxFcDoqbGXIBWo5NojSGyfOEOCPNw5tcsmFtvyS0yfeAIgb3MtdxYLVIQQsZbyWiDZN8V7F1KaklxErCf9IjmzXR8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","files":["index.js","lib","package.json","README.md","test"],"engine":"node >= 0.4.1","engines":{"node":"*"},"_npmUser":{"name":"pofallon","email":"paul@ofallonfamily.com"},"_npmVersion":"1.0.106","description":"A node.js library for accessing the Nexmo REST API","directories":{},"_nodeVersion":"v0.6.1-pre","dependencies":{"request":"2.2.x"},"_defaultsLoaded":true,"devDependencies":{"nodeunit":"0.5.x"},"_engineSupported":true,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"nexmo","version":"0.0.3","keywords":["nexmo","sms"],"author":{"name":"Paul O'Fallon","email":"paul@ofallonfamily.com"},"_id":"nexmo@0.0.3","maintainers":[{"name":"pofallon","email":"paul@ofallonfamily.com"}],"homepage":"https://github.com/pofallon/node-nexmo","dist":{"shasum":"6c157610b3167c12acdcf0cb0af30c5683511613","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-0.0.3.tgz","integrity":"sha512-HTaob4elrYkPFXeYA+wNI+X05BatTp1XGaPjTqRHHo7E9rcFBJnVyFLOCj/OUKO2uzjA8MmG0G+JSHFSH3OBnA==","signatures":[{"sig":"MEQCIEwlvqdjLVxwkLWiEVnd3eihTBucMXA33gETP/Mdn3BGAiArKZrs+t5lddNCcg0tsZkqCPF6wY/nz7w+y1J8L+KNew==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","files":["index.js","lib","package.json","README.md","test"],"engine":"node >= 0.4.1","engines":{"node":"*"},"_npmUser":{"name":"pofallon","email":"paul@ofallonfamily.com"},"_npmVersion":"1.0.106","description":"A node.js library for accessing the Nexmo REST API","directories":{},"_nodeVersion":"v0.6.1-pre","dependencies":{"request":"2.2.x"},"_defaultsLoaded":true,"devDependencies":{"nodeunit":"0.5.x"},"_engineSupported":true,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.4":{"name":"nexmo","version":"0.0.4","keywords":["nexmo","sms"],"author":{"name":"Paul O'Fallon","email":"paul@ofallonfamily.com"},"_id":"nexmo@0.0.4","maintainers":[{"name":"pofallon","email":"paul@ofallonfamily.com"}],"homepage":"https://github.com/pofallon/node-nexmo","dist":{"shasum":"9b9cd746f03ccd02610c920bf722a1cf3900af6d","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-0.0.4.tgz","integrity":"sha512-gE03mvhnU8/2LV7NJ2DWebkYRAPbErxHlaHJQw1N2Eh7cavoRYBuAILKPGagS2DfUK009BH37/uQnExHXp3S3g==","signatures":[{"sig":"MEYCIQC3+FqZeTSDv4NAThhamf7X/oj12THV+Lcc9oViS/dO5AIhAIDT0jCXpWKaBuKd73fbBmJweqcpAM+91I/wVS3VWPZZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","files":["index.js","lib","package.json","README.md","test"],"engine":"node >= 0.4.1","engines":{"node":"*"},"_npmUser":{"name":"pofallon","email":"paul@ofallonfamily.com"},"_npmVersion":"1.0.106","description":"A node.js library for accessing the Nexmo REST API","directories":{},"_nodeVersion":"v0.6.1-pre","dependencies":{"request":"2.2.x"},"_defaultsLoaded":true,"devDependencies":{"nodeunit":"0.5.x"},"_engineSupported":true,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.5":{"name":"nexmo","version":"0.0.5","keywords":["nexmo","sms"],"author":{"name":"Paul O'Fallon","email":"paul@ofallonfamily.com"},"_id":"nexmo@0.0.5","maintainers":[{"name":"pofallon","email":"paul@ofallonfamily.com"}],"homepage":"https://github.com/pofallon/node-nexmo","dist":{"shasum":"ca77fe56ded08a2221878626da68341bab80a112","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-0.0.5.tgz","integrity":"sha512-SUbvKdROC4uR/3yhrIbT4Vvh2Uk4bMH++vcyf00/6Ws4pWOoBtzpmQ2HwCsTNltRhlRWiMRazO228HVWhKEnag==","signatures":[{"sig":"MEUCIQDjtHCaIuR/2EtafVQ9sFE6kESwfmBwTC6glIjV8J88OwIgJKG8/wooYM8otj+WcFEx/0hyCu84aQ33ITXl5+XBXLQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","files":["index.js","lib","package.json","README.md","test"],"engine":"node >= 0.4.1","engines":{"node":"*"},"_npmUser":{"name":"pofallon","email":"paul@ofallonfamily.com"},"_npmVersion":"1.0.106","description":"A node.js library for accessing the Nexmo REST API","directories":{},"_nodeVersion":"v0.6.1-pre","dependencies":{"connect":"1.8.x","request":"2.2.x"},"_defaultsLoaded":true,"devDependencies":{"nodeunit":"0.5.x"},"_engineSupported":true,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.7":{"name":"nexmo","version":"0.0.7","keywords":["nexmo","sms"],"author":{"name":"Paul O'Fallon","email":"paul@ofallonfamily.com"},"_id":"nexmo@0.0.7","maintainers":[{"name":"pofallon","email":"paul@ofallonfamily.com"}],"homepage":"https://github.com/pofallon/node-nexmo","dist":{"shasum":"76244a622a85f8523021ab196ec61a5cdcf28f85","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-0.0.7.tgz","integrity":"sha512-xz/UqHF6dYQ2eRs0wYAK5aCEAI+jwMfmpyzCRmmCMG30Zd7qwW0P+5UdS7nCCq+j9j5Q+2Im+cZrOP8zQI7m0A==","signatures":[{"sig":"MEUCIFNMSnOt2tbw4ucuujbQo+G6k/4X6RkTO06YjUdf10X8AiEA0uO8LuJ27zcV8Nj60OYgzDeNN0WD1TYEDhNX6LULg+s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","files":["index.js","lib","package.json","README.md","test"],"engine":"node >= 0.4.1","engines":{"node":"*"},"_npmUser":{"name":"pofallon","email":"paul@ofallonfamily.com"},"_npmVersion":"1.0.106","description":"A node.js library for accessing the Nexmo REST API","directories":{},"_nodeVersion":"v0.6.1-pre","dependencies":{"connect":"1.8.x","request":"2.2.x"},"_defaultsLoaded":true,"devDependencies":{"nodeunit":"0.6.x"},"_engineSupported":true,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-1":{"name":"nexmo","version":"1.0.0-beta-1","keywords":["sms","voice","nexmo"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-1","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"feb75dd19d9c130f16cbb284a5ca72a3a835c95e","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-1.tgz","integrity":"sha512-VG8EXtAYH0oBNTgphH7ceOuxFTJpOPVebZ7iO7327O3DYE/Of8fh2PEMJ0Y3ADoWzMGC44812v8vmNvBA5TyVw==","signatures":[{"sig":"MEYCIQC18b2sR/SFYmw5dT+E+l4HF0G0AHzTA9nQNCORJzHxOwIhAIhIgAil3BzhPWC/LrSqJsQzqx9MyAqZAWTszd2A3phZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/nexmo","_from":".","_shasum":"feb75dd19d9c130f16cbb284a5ca72a3a835c95e","gitHead":"a12744ae069da6c86c9fea2c6fb7a0ecca0ee85f","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"A nodejs wrapper for nexmo API to send SMS","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.6.0","babel-plugin-add-module-exports":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-1.tgz_1463328358563_0.9801781820133328","host":"packages-16-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-2":{"name":"nexmo","version":"1.0.0-beta-2","keywords":["sms","voice","nexmo"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-2","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"8871a3b032018b009cd03c1dde1e042a1f5857ae","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-2.tgz","integrity":"sha512-uvuwUaKTrCiLb6aztAS/tdQeRKi2WaFdBNOMHrc0EDvaZswVxtS6WZ6+lDjpqn/EiDUUr7okyrmKr4JyxiYdtQ==","signatures":[{"sig":"MEUCIEzx3oaIad6/IeWFeEQ+4RilTpgxynK2s2bi1ar7Y5EBAiEAzWMDtxoFo6x+z5rHn/J+yXPjVNXv4VnXKBnAxQXoRSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/nexmo","_from":".","_shasum":"8871a3b032018b009cd03c1dde1e042a1f5857ae","gitHead":"9ac3e867cf827cc536eae1e7fd66100c754b7d45","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"A nodejs wrapper for nexmo API to send SMS","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","sinon":"^1.17.4","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.6.0","babel-plugin-add-module-exports":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-2.tgz_1463334865475_0.42370084789581597","host":"packages-16-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-3":{"name":"nexmo","version":"1.0.0-beta-3","keywords":["sms","voice","nexmo"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-3","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"5a34ba1e7c9fae6010ac8d1e13e4c1799b10b133","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-3.tgz","integrity":"sha512-wVrv9blvlnC5eaDjhIy4RNio01ppGEQ/kH9drSaolomLhEce9adkXkhfSlNsrlwyC9klFjT4Yd1pmFKPSJHVpg==","signatures":[{"sig":"MEYCIQCxBKOnQirRCcKWdpMk/GJL4d9I/PnbpeDpKjouXRWkhwIhAKgV6FCrDS5bLU8WGwUp092+bqGWCN5oESJIeli4E0+U","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/nexmo","_from":".","_shasum":"5a34ba1e7c9fae6010ac8d1e13e4c1799b10b133","gitHead":"4097b6017e66cd8113959058dd9a8f089f966568","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"A nodejs wrapper for nexmo API to send SMS","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","sinon":"^1.17.4","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.6.0","babel-plugin-add-module-exports":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-3.tgz_1463341816562_0.1469411796424538","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-4":{"name":"nexmo","version":"1.0.0-beta-4","keywords":["sms","voice","nexmo"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-4","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"1efa197b836b1f07458c09c08d79acb90bd9044f","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-4.tgz","integrity":"sha512-ytIm8SvYbSYbYb1sj62jPUqD5t1dbgiT0O/lAq+Nk3D979xl+GYSI6c/rKaQylB/kq/GFRP7CJ6UjHjF2jK89A==","signatures":[{"sig":"MEUCIQDZSJXgiKufTmeAHe9yFLY/NUZ6lKbUb4y47z1YENcciAIgJ/5j/p488a950uIKCUpDfJap5XgBnR4ElN3kiZMv+LA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"1efa197b836b1f07458c09c08d79acb90bd9044f","gitHead":"113aedf7da71bd2e3454b1a297ddb06da1c7c1eb","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"A nodejs wrapper for nexmo API to send SMS","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","sinon":"^1.17.4","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.6.0","babel-plugin-add-module-exports":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-4.tgz_1463342036209_0.6510880687274039","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-5":{"name":"nexmo","version":"1.0.0-beta-5","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-5","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"a9fbd983ff03dc96df7ddc9f616daedf60505035","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-5.tgz","integrity":"sha512-0Z2ojcI4bN/V9QT/483J/ugARtGOm46YETar7forM4r4yxhyQvo7dYqOPSugH8imqIGYvOpDopIT2UI1Cxwgew==","signatures":[{"sig":"MEUCIQDtwAptt2dVX/KNG/R4ahn8r4gROsxY/CiDSRkShlFzjAIgMGOfP2/QpJlG66nxInwfSa1nHr7a77kdLyRkgehWqz8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"a9fbd983ff03dc96df7ddc9f616daedf60505035","gitHead":"0cefd4dc30a0f417f6a6327482fae69a45381804","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","sinon":"^1.17.4","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.6.0","babel-plugin-add-module-exports":"^0.1.2"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-5.tgz_1466687253272_0.1645638768095523","host":"packages-16-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-6":{"name":"nexmo","version":"1.0.0-beta-6","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-6","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"57bab6a39349a37be96cffc67c0ac247c76bc685","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-6.tgz","integrity":"sha512-nuSMmBQlkALpYS7qLPKJQFi4w+oQ9A1aCdlK/MCngJt4o2RuFRygC76k61ZTWidzy6pvLp3XLkB8KXBZngp4mg==","signatures":[{"sig":"MEQCIEDcJ0jS56ujhSfa7KWhYay3iBD/7AcB8omm4lZAmWiQAiBPr8mH8mywdAd7jOfwhb8e4SvNhWeX7e9XtuGeMAMuUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"57bab6a39349a37be96cffc67c0ac247c76bc685","gitHead":"76edfd3fa38bdfe1124c98ebc5ca9c0f4a3add2b","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","sinon":"^1.17.4","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-6.tgz_1467839084610_0.8180491589009762","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0-beta-7":{"name":"nexmo","version":"1.0.0-beta-7","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0-beta-7","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"e8b85eb079f13319936383d5583b1632f2e201dd","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0-beta-7.tgz","integrity":"sha512-7B0v4xukN7el6aEJ+1/F2rsxj+Eo7QjU/6aYLTGbfCR6wYfsf2Ez0s9TQn72R6YdvVQP5h/SC4U89rAeUD/lig==","signatures":[{"sig":"MEYCIQD8o9du+LZYREfRVkVKt95ggjf5G1ZMrGbtFr+0c6grQgIhANJEhMi7zLXiqBHpyMqgkQjeNqfgy8bHCAqOJiZCE8nJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"e8b85eb079f13319936383d5583b1632f2e201dd","gitHead":"d8796c674e76ba34b89b30904777cfe756190cb4","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"5.7.1","devDependencies":{"mocha":"^2.4.5","sinon":"^1.17.4","dotenv":"^2.0.0","babel-cli":"^6.7.7","expect.js":"^0.3.1","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0-beta-7.tgz_1467927999082_0.9018470651935786","host":"packages-16-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0":{"name":"nexmo","version":"1.0.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.0.0","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"4741218d7a507400fd9c9ff2b2612221f46a239d","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.0.0.tgz","integrity":"sha512-WgZDl/fIUww7WD5JLo1ZSwdGhvtJaL+D6BIeF7m+qJr3/2Dw4/lJoIrM/ypPuI7sOIYTMpeHoKI3SBL/9UTSow==","signatures":[{"sig":"MEYCIQDxHHvn+YEQ79l0CwVoAB5OwlI68cWGMaEfVv8Rexac8AIhAOjhwbgDVouwXYXmi7HCSJXEvZEhHZsOHgVWxccAikH0","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"4741218d7a507400fd9c9ff2b2612221f46a239d","gitHead":"94b20d895edbfa54f6674a99354a655f855d55ff","scripts":{"test":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","compile":"babel -d lib src/ -s inline","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm test'"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"4.4.7","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","express":"^4.14.0","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.0.0.tgz_1473762365991_0.9992899105418473","host":"packages-16-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0-beta1":{"name":"nexmo","version":"1.1.0-beta1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.1.0-beta1","maintainers":[{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"30b0119e13a7b01dc71f3b7c521b0f7c9dfeb0b5","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.1.0-beta1.tgz","integrity":"sha512-dq+nYxPM6jhmAyEtdfjCh94FucX6cCAwBN9nI/OPj4j+enKpKaWmmRz/vn6uJjzJmR8+Ys+rapo3nVoJdozIsg==","signatures":[{"sig":"MEQCICc629N4gXJmoZHH9tuVxA49SLM/MkU4ey7oQGdGkN7/AiAAugp0SlKr9zEyHE+SPKnBHkRWuc5BZgthqfmYV/OE8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"30b0119e13a7b01dc71f3b7c521b0f7c9dfeb0b5","gitHead":"169bb8614ba4c410ee281ffb596a5465dfecff3c","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"4.4.7","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.1.0-beta1.tgz_1475931657842_0.6282922748941928","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.0":{"name":"nexmo","version":"1.1.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.1.0","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"8c3a8ed6a9c6218fc8af314ca6b201a5a2490cae","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.1.0.tgz","integrity":"sha512-RDjR1TdM+eEsHqxJ7g1HOouqixWnaHuXBhg/twIorqsAOeQro9nhkC4L6ebrwyVONR47hohCNeeWhrFhkZI8Fw==","signatures":[{"sig":"MEQCIE3jHiTxo6XotHTHbYQalH87R9XWCpFOPsT2k8GyuB9UAiAv0YQoKDRiBPUbpDZrNHQSFn/V2mjWHRK2iDEaNPSoqw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"8c3a8ed6a9c6218fc8af314ca6b201a5a2490cae","gitHead":"e8e0e5d2e855e2fac378b15ecc81cca4f4d9bd93","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"cbetta","email":"cbetta@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.7","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.1.0.tgz_1479129786812_0.35759160621091723","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.2.0-alpha":{"name":"nexmo","version":"1.2.0-alpha","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.2.0-alpha","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"71170f7b896daed148905320d1aa0a88d0f54856","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.2.0-alpha.tgz","integrity":"sha512-bwIOf+385yaS7ZwfX9VSq4YTkLfqvpOgt8ouGFLB4sl0FVLBGPZf64ExzAxfiOYdm9A/5vaLqs6IK5JpThJBLQ==","signatures":[{"sig":"MEQCIC25IDm084ISHkC6t7JRP8lk6O6fRAq/5LtcbRNPE9YkAiAKcIY4yWDn6c7eRgg2Vb3efApR11ZlZ+0tbBiWb+aY7Q==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"71170f7b896daed148905320d1aa0a88d0f54856","gitHead":"b5dc24d1768cc33d2cdda324b3dca71c9c002f8e","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.7","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.2.0-alpha.tgz_1481045199109_0.3816325203515589","host":"packages-18-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.1":{"name":"nexmo","version":"1.1.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"_id":"nexmo@1.1.1","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"957397abb8e1a9d6d4c6bd57a7f101e6d06c2c97","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.1.1.tgz","integrity":"sha512-P5wDxx4/Whg5GkfsYzERcTgfjzlYi0FNzImm5wdjb6eUEtZzCcxUFTna00coHpBjoPKT+1dRtGJOAoSCauxClA==","signatures":[{"sig":"MEYCIQDTA/aloRQ3nZKFT9ULWTiSh1h15Tx32/xS/nYHG9Le3QIhANXxPyZzfOhRrrSpNvDqH5OmITW9pT+PsUcmWQ1t2wT3","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"957397abb8e1a9d6d4c6bd57a7f101e6d06c2c97","gitHead":"1067ef22ff0f911b8a2fc65e46da697830dbe89a","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"cbetta","email":"cbetta@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.7","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.1.1.tgz_1485195740586_0.01859608944505453","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.1.2":{"name":"nexmo","version":"1.1.2","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@1.1.2","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"01e909a6cff85cd7e16160b2f8e7fe1c5e96118a","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.1.2.tgz","integrity":"sha512-ZE5vOSSN6XPTn+IfiERhzGE+usPDXbTnR8rHJQABzMLHWYxNosViUkBw3uDY7srzpwwGnkVHYa0UgKhTwI13MA==","signatures":[{"sig":"MEUCIQCyxNMwdRf+9ohg02hYXmtoAfXbA3Zstu1wgBoxMvhlOwIgR9HRytK8CkezPhNqMe+d4qc9o1Cxmey09CMdfhCzVP0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"01e909a6cff85cd7e16160b2f8e7fe1c5e96118a","gitHead":"2737c0ce9b9831828019ea5141cd04828f38360f","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"nexmo","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.10","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.9.4","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.1.2.tgz_1485785578052_0.24396717199124396","host":"packages-18-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.2.0":{"name":"nexmo","version":"1.2.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@1.2.0","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"99f4e765cf6f6709103df4cb25b3e6991d73fdb5","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.2.0.tgz","integrity":"sha512-4x/8VCtlImtPgfaUfIyjTG6mvz/z0PKvFa2fnTgaOjsm/U1tQQRCIBa3jkcfj74YW+d8EwoXvhsbsDijn1zbcw==","signatures":[{"sig":"MEYCIQDCXTA1uhXjwRYZo9rVlYKyol6TCDctA0qPIsWYUNNUlQIhAJEF+DbAf+Z+6AR73vMcXxkUwzqAUaQ3kSsuFcyqyzwJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"99f4e765cf6f6709103df4cb25b3e6991d73fdb5","gitHead":"c5c57ca7bd8f9a31b9cd6f400d579085376a877c","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"nexmo","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.10","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.9.4","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.2.0.tgz_1485874438137_0.873542868765071","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.2.1":{"name":"nexmo","version":"1.2.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@1.2.1","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"a6a3fe76091c7152a647475681b1cd3e82c42a97","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-1.2.1.tgz","integrity":"sha512-RH2PocXYIvPc39wxup5F9qzCUrJotV5iUqM7/iHKb+UiKyBNJrfvU5dK5GtrO01JIYFxOwBbgZ0/FMweAFTMUA==","signatures":[{"sig":"MEUCIQCzDhqfPMl/BWxZe6OpjS73ZKmjB6UjPINCoh9rq6h1RAIgVk8+kV/NGID7fbKjaRW2V2SW9W/J4W7bOv/BmeihBXI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"a6a3fe76091c7152a647475681b1cd3e82c42a97","gitHead":"ea38dd44f3fb28c119a1fd9f8e7be588429f834c","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"leggetter","email":"phil@leggetter.co.uk"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.7","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.7.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.4.5","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^2","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-1.2.1.tgz_1487808644771_0.17996141966432333","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0":{"name":"nexmo","version":"2.0.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.0.0","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"138749261f164e309d5a12e9cc4582c758cbe834","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.0.0.tgz","integrity":"sha512-yS+Ts8WJOXQ5hwWmvty45vBaTFxwfizZfHb7QGbUAVBb7he+xsj/MyDEoEFwj5dyKjHCjecM/QrDfBurNjObqQ==","signatures":[{"sig":"MEYCIQDMZqaulWaWPDqCq8E+tezE+ZtZyoWo2bLcyADXqw6NigIhAJnBWUC/8GQp1G2kYT25hRFPczuweik5K50MQp1mMToj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"138749261f164e309d5a12e9cc4582c758cbe834","gitHead":"9843498dbeac9b48439ab18b893b315af7831daf","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"nexmo","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.10","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.10.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-2.0.0.tgz_1490053925469_0.7885732736904174","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.1":{"name":"nexmo","version":"2.0.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.0.1","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"0c8c08da6c32b22b43578709bcfef2f5c78871ac","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.0.1.tgz","integrity":"sha512-Fo70zA7XAuztQV5vlANHcLI1pcDiziZH5Acg6jvHE0nCN49xpiFdlFgmhHeSEhI/uED+MK15FYjVXKfTkNnv3Q==","signatures":[{"sig":"MEUCIHQgqlw2NdWERIiAjffCS6SKe+RaQkPNWpIdXU6zVgQ5AiEA+ET2XUVjVVcPyvmKnxqB6C1THRXt0JcOBAdQcYNOtbM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"0c8c08da6c32b22b43578709bcfef2f5c78871ac","gitHead":"34158edfb8562814cda0a1681e27eb937ba667e6","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"nexmo","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.8.6","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"5.12.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-2.0.1.tgz_1490104312736_0.4617929991800338","host":"packages-18-east.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.2":{"name":"nexmo","version":"2.0.2","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.0.2","maintainers":[{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"nexmo","email":"devrel@nexmo.com"},{"name":"pofallon","email":"paul@ofallonfamily.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"165b20af7b0a566890714b7ebf53be645f0596fd","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.0.2.tgz","integrity":"sha512-x6L8wTbBgy1xHf9KbPYDo01ptG2YjBtmEwZQURdMzBbODvXotC+SjBPG806ZzqpST8GurU5nHLZz+OJGeZr2kg==","signatures":[{"sig":"MEUCIE4gd7FgWoyWD3d7OO9w/xrgpeCUfDM47C5qvqgdgZIHAiEAqmBNvTAKFFTRz4KZbde28tb1Xl6K6dK65McFD0hsdfs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"165b20af7b0a566890714b7ebf53be645f0596fd","gitHead":"80a055fe3fd71f6cb104ce2a9f496ad8aeabde34","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"nexmo","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.8.6","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"5.12.0","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-2.0.2.tgz_1490201745807_0.4142469905782491","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.1.0-beta-1":{"name":"nexmo","version":"2.1.0-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.1.0-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"},{"name":"cbetta","email":"cbetta@gmail.com"},{"name":"leggetter","email":"phil@leggetter.co.uk"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"6e57eb67aa48a8dca3f3351349fa8c3f70e5419a","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.1.0-beta-1.tgz","integrity":"sha512-YUvGYxNagomIQnhU2f+Swh+lKgzVpJ4BZkjurVhDpIZ69AUI7O8Uka0yCW5Q/7VilaJZFfrw9cYcJDyz8dhzYw==","signatures":[{"sig":"MEQCIBs1zlKDFx6XHOitPwT8iaWcQFtExXRkgiWfTjw8v/VBAiAtIyd+hMrMmkA9aULWUlWG7BkPPzGQZY6SgeWtXGwY3w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","_from":".","_shasum":"6e57eb67aa48a8dca3f3351349fa8c3f70e5419a","gitHead":"dc02fb872f146a697e8f5ede3086d4093d5f5ade","scripts":{"test":"npm run-script test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"eslint test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run-script test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"3.10.8","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"6.9.1","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","babel-cli":"^6.7.7","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-2.1.0-beta-1.tgz_1508342017358_0.3898545657284558","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.1.1":{"name":"nexmo","version":"2.1.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.1.1","maintainers":[{"name":"mheap","email":"m@michaelheap.com"},{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"3ead64582c7c698fa6a20465df4e33d119148499","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.1.1.tgz","integrity":"sha512-Mz5TPVzHXEsDBxEihylFidBujfs9CMSOHWG/b29faxJP3i8V4dIECJtyc2BCP/wR5Ia1/dP2fYAAZadnl8r3tg==","signatures":[{"sig":"MEQCIEWsSKGCZ0j2kZZ4HnVX6N6VDgzeZA/Iz3KvjZlt128xAiAuxIot8QDly9qK9L2QlVKp7rYU8ChvVnIKlNp+n2rjnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","gitHead":"5743e6512f35d8db13f5eed4df9628fc476fe612","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"nexmo-devrel","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"5.5.1","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"8.9.3","dependencies":{"uuid":"^2.0.2","jsonwebtoken":"^7.1.9"},"devDependencies":{"nyc":"^11.3.0","chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","prettier":"^1.8.2","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.5","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-2.1.1.tgz_1513265350490_0.48391280695796013","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.2.0":{"name":"nexmo","version":"2.2.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.2.0","maintainers":[{"name":"mheap","email":"m@michaelheap.com"},{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"27d20458071915f0e3b8090eaf4d5c12ae05a53b","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.2.0.tgz","integrity":"sha512-7D/QVyQakLJ8M40hANSvINzswK/3XWfml0hY7Ce2pwn5Kinu5UL5i5+nobnvvftoi0mv1Sx288+fmVEqJkh0Mw==","signatures":[{"sig":"MEUCIAthQOTJA/175DnWgda5jPvYIygDtE8g4S1xPGPSkZnoAiEA0WxYEM0x7VvviAgIzddhkc/knSzULYMAGnu04EZaqTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"lib/Nexmo","gitHead":"60fac2fead5006f55548593d15caeb34d7cae1b1","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"nexmo-devrel","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"5.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"9.4.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^7.1.9"},"devDependencies":{"nyc":"^11.3.0","chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","prettier":"^1.8.2","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.5","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo-2.2.0.tgz_1516802728314_0.23182733822613955","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.3.0-beta-1":{"name":"nexmo","version":"2.3.0-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.3.0-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"a41f9284bc81e82eaeb8725f488b9763b68a6231","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.3.0-beta-1.tgz","fileCount":79,"integrity":"sha512-3IzMN8OmMMbM+sbZ+3fxj2F5k11O17ijlNTFpN/euWf6cBE49eGlWxAxL42utsULkzEI7dCZxYjbNPQMMwD3pg==","signatures":[{"sig":"MEYCIQD1vTpHGjBAMITQaIZ5NG/hhDbz6Asw6HQ4dHxw1TJFtwIhAJ09vKrxyjpqg+krSKThmNkUNkxjqCHiuOjIUKqLb+rI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":479486},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js [![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](http://nexmo.com/).\n\nFor full API documentation refer to [docs.nexmo.com](https://docs.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n```js\nvar Nexmo = require('nexmo');\n\nvar nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo\n* `apiSecret` - API SECRET from Nexmo\n* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice related functionality.\n* `privateKey` - The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`)\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.  Required for voice related functionality.\n  * A path to the key file on disk\n* `options` - Additional options for the constructor\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `opts` - parameter is optional. See [SMS API Reference](https://docs.nexmo.com/messaging/sms-api/api-reference#request)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://docs.nexmo.com/voice/voice-api/api-reference#calls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#modify-an-existing-call\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_put\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_delete\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#talk_put\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#dtmf_put\n\n\n## Files\n\nFor detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api/recordings\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#vrequest\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/basic\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/standard\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advanced', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/advanced\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exist to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://docs.nexmo.com/number-insight/advanced-async) documentation.\n\n## Applications\n\nFor an overview of applications see https://docs.nexmo.com/tools/application-api\n\n### Create an App\n\n```js\nnexmo.applications.create(name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#create\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#retrieve\n\n### Get Apps by filter\n\n```js\nnexmo.application.get(options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#list\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#update\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#delete\n\n## Conversations\n\nFor an overview of conversations see https://ea.developer.nexmo.com/conversation/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation#retrieve-a-conversation\n<!-- TODO: uncomment when the API is fixed\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation\n-->\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#add-a-user-to-a-conversation)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation#retrieve-members-of-a-conversation\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-user)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation#retrive-a-user\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation#retrieve-all-users\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation#retrieve-all-users\n<!-- TODO: uncomment when the API is fixed\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://ea.developer.nexmo.com/api/conversation\n-->\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### Get Pricing for sending message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, countryCode, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `countryCode` - 2 letter ISO Country Code\n\n### Get all numbers associated to the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean refer to the Nexmo API  [documentation](https://docs.nexmo.com/tools/developer-api/account-numbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean refer to the Nexmo API  [documentation](https://docs.nexmo.com/tools/developer-api/number-search)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://docs.nexmo.com/index.php/developer-api/number-update)\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Workflow\n\n### Create a workflow\n\n```js\nnexmo.workflow.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nvar Nexmo = require('nexmo');\n\nvar jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nvar Nexmo = require('nexmo');\n\nvar nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nvar jwt = nexmo.generateJwt();\n```\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> !!!IMPORTANT!!! This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nvar nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User    \n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"5f876f91d42726a68261b011befa292f2207b7b5","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"mheap","email":"m@michaelheap.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"5.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"9.4.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^11.3.0","chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.10.2","bluebird":"^3.4.6","prettier":"^1.8.2","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.5","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.3.0-beta-1_1520990447702_0.3774200427529748","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.2.1":{"name":"nexmo","version":"2.2.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.2.1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"cbea43697f30af51a895db34ae90f1e0e1291f28","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.2.1.tgz","fileCount":68,"integrity":"sha512-Gr6uSxvVVMJy3gJE/HznkgkxbstwOZbG03t6Ln8ehcgNkY2GrU0vsP4ZdadGuxfgTJ3oZHvijXAYBpb3d2W3XA==","signatures":[{"sig":"MEUCIQDQ8Bki0PgQ3oebqzOmEpskY2Z/c929fmkTwJDgmOBVTgIgAxC0i7xPRUL6DFQhU+pMycdkOd3WmGe3RCAtaHn8Pl8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":451787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa5aZXCRA9TVsSAnZWagAAFJ4P/itk0qt0C+IaRPGdZTJM\nFY8Q1A1SVwDKWgsp7bPoqqLEe+mjpbjwnRzbe+SXUpLaSMtPBWtnypvDOMbU\n7A8P/Z12y8CEB40tznG981rvybjCg1YZI4bCjcdcDbudZM1X/y8wg/2M9w5g\nryHGGVh1MzsYVHC5O7AGpm0LczUryCAvkYvBcVDDa1LPwBzObkmV2OwTYgyF\nFYyRfYY8Xa61PwsyXYhbDSUddBUdE9+HLtuduqXxYNCzsXQ3f/IrdJgLnXA+\naUotiNf1mZZsgTSRM3/21Cih9Qq16lMsC4bOlvWeY+xipjqcEOuXKBNAW0Js\ncHG9nUN5U83Fees+eQCGMjALM5S+1hmPmWa7s0rQu31L2jxKOnEH0Z5jnttz\n/ude/92zPdrLV9IxwfHe4S/4fRPSgrVU5eVGL6z+LUhxoJb/tC/xM0w/44vs\nWA66TYAj/GJrM7Tushatl65MSyyfcPyusXxK7lwJmoYIbsg6e/Onu8Yq6fNV\n0hvTpMmQV30oyxo474nwK+c1NyJCPzBmNg+raV4b2z8jVSuqfKCp5pTEHZq+\nyV6/D0GryrC0JeKVWUNDubp8lnzQvuyYTxyOmwo3d0TFLCEJWg4sysWZelj7\nr6EvbWyw0iRARfGP7uhh+zHfLoL5M8zC+LHOQGTcFGwjJ4JJE/jleH6XPBdK\nWfdf\r\n=LLxw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"9397b01ae6ae0f461ef455c960807b2d8b40ddb3","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"mheap","email":"m@michaelheap.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"5.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"9.4.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^11.7.1","chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.3","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.2.1_1524999765570_0.5576714462082013","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.3.0":{"name":"nexmo","version":"2.3.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.3.0","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"08316016822de9ed6de88e3745237d86b72bd2b9","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.3.0.tgz","fileCount":70,"integrity":"sha512-kpR5CT4GYVy1IIXVQWHsF+m0LGf0pQC7Cn4pXAlExHGl4r55LDREgKl5kflr3zPcfnjw70D6H/VsUBZx8bmgPg==","signatures":[{"sig":"MEYCIQCsnrD+Hi+V2UY6ziIQaofne3bhhbToY/IppBcj+dqg2wIhAMfLJJEQ1qTRjIFkPDf090P0DimNJG49Y0szK5d2j7qP","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":462758,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbEVzyCRA9TVsSAnZWagAAThUP/RIvHwFDjiOxVb0Xk4ol\nZHIU71IeY6WKI1mFJGDuvf+/JPiSuRtK1Cy3ObLqqYfWSA87NVu2HL1joCzr\nEZ2bAIrTZE5atPo3Qrfj16nnUiefRb442kCULixDJDBNLJLMLGm+i7uCXCoU\nukY3BrtoBo7oQbopqQJFd4ztG3xCJtPOBwDcP0qSGuH0bv36lMyOM68eZL8q\nVKiAIaC5BgRqS4p+5nsnqMzBbCZ3DGwwGsf/XPHHuUKvqxeqeO2Rh1lrA/AW\nnQGwAc9EJ73xowtVlukJsst02O2qdw2jlqz0Xyrmtg8e7T0xCMe/BGWPX7KQ\ngEN4E++bq9uUoEJb2716WxOFBAv8i9MAWlOaBdFMV9ydwTtIccRPU71yxDxF\nWLq7QvgozLRG9RHXIHIeXC37UnlUcgZxYwjDYyxZiL9QyWMjBYt3APq5mSa6\nQng4BWJonHOaVxQktZVPZZwZAlOadAkLtetHMUWAbubNk+Kbk5Z6Olchud7D\nhEidxXYPtT2QeL9K4rWBSB6ll7dRMjM9jQLEyGo4iumptSPDL7cwhQmXq2Ea\nu70UmydeopB8QLzHTdfVVXrqg9HWGZo/tVqJBI1pw8dg9R5Bkw4R+FbSznXI\nPz+lu0fEw7qiVyQjTBbAabpK0mISRNbGsVlskqbAU/vsAAcSWVC4BgBnZtuE\nwevY\r\n=F+d3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"1063a55ea04b7c90149e55d0fe7cb85d138e8bbf","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"mheap","email":"m@michaelheap.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"5.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.0.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^11.7.1","chai":"^3.5.0","mocha":"^3.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.3","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.3.0_1527864560841_0.2071400868660076","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.3.1":{"name":"nexmo","version":"2.3.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.3.1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"2a3426cf531c3bb8c652d941ece2bad7b655bd39","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.3.1.tgz","fileCount":66,"integrity":"sha512-xjuVXOXHt4YAwh1gZUFkYiIQ11RmCGWwOLysJk2UD2yNBziG2Na6Of+H0nOJGTfb33nurY4DW/3SS+e7VBaKow==","signatures":[{"sig":"MEYCIQDVDpkxa5y+jAKbcbhaRyHxKP7Do/BQ2ARUAKuJqvA45wIhALukV2+b/+Pe4CZfUUdDTNmXUNZtOJiwcn8fFtkns8LQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":772106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKCaBCRA9TVsSAnZWagAAlpcP/RPA+dxVCi0jXgrgI/ed\n/OG4UBTgn1WQRSsBhE+CbJMYXdlCsN0KpeJfC7DZYIUdNEzLD02McoJPWo3M\nxOrAUKWw52kCjdCY8Qmbf8uTRtExMynJ2Kuk+z/ubw3sD1WZGdLZjUHutw+n\nYfdIkqTWryRceeQ72dhE9vjK4ARz2eVlS3Y38Uo9RfdI8cO3wqiHrqKXp6s+\nWPa/JHAqMMzB/qnBkOCGfF1eI6QUS7fz4D92JRcH67pWCLCsBp3iWviD9V0s\n15Oz3Y2/JULT5GbGZ1ZASkNCWtnD+8Y05bl88iMLHcfaz6mVftbuT2qI75U2\nFHEGcCPRith2AT3bt6C8i2jUuZGXVSYJnjHA5z4v5VUb4klw8vjYmoVf/XeU\n60Pzg9/FXtcyuoCrjXdTli8hRAXvXLDUIUfuWLlh5fadWv/XiszvQN9Bj7NC\nQr8A1OSMpmUW5xkZV9i5bq6Iieaqf6g/8wRP+7cJG00Y1Ud+OifoS6VJ4xp4\n1xFUQ6Vh7fJCUvvGFUf1PPvEWt4pPWmDoSyHClwox8TNTpcu7qQmw1Nj6vkr\nKWowKLyufTMvV1pFYyE/6XK39QQqvhxvi4AregZKi30WUbZUL+hVFI3Ign1q\nhL+aaR0p460r/uj3wwjLjyr4wg7zjWW3LDZQfGuxMP8sld29z/fLVudWesR3\nC6qX\r\n=B7Qo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"5865b071f64892ca45ea459b284bc93d21e2aa16","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.1.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.4.1","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.3.1_1529357951602_0.517676096490953","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.3.1-beta-1":{"name":"nexmo","version":"2.3.1-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.3.1-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"2ab29c6e51bc5d5f9a0f593db65dab05092f0275","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.3.1-beta-1.tgz","fileCount":79,"integrity":"sha512-GeZIfVmYE/cpZaMErUZ9V6pUe5ZprmumEeRqx1mBgRpwOLHeLOcYe2VZBY17XYslW8KPZK8LWK7p+PQ3+fMKtA==","signatures":[{"sig":"MEQCIEM8gfi3uStqEoZb0m14dbh7UBE5F95u+6yIlQ79gO8cAiAxq9UySFZtXMkmLWwgG8SyYHkuPtKUcFllfWZ6OQqaRw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":809422,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKC9/CRA9TVsSAnZWagAAgjoP/3rRvIuz41QDusQCkCe6\nzE/QAQXeHIkQWmLioylvSghyqgUHILo32nwHJ2kswRFah6SQB6fV/xeuty8B\nm4kAXmgr+aGUD7EmredoteMpLf/DX4vs4MUXXIDH7B7HS9c8nILy+Jgqtzof\nJQUHyb0H1+pYgVpIQ8BGVXu0Y8uR921MzAQKl6XI/jEBzyjIdM/Q31kkDJif\nauCTFdNAz1cg5asbjIed/4cWsUHWUula/A+k7IcLlwF7KmJnyCpo0IZR6/vP\n9L8NaF9jqOCSebCRCR2Bg+MJT8a+RDVn7J+BdhFMhaxeV8/WBC51iX4Rtlsf\nZP1qckCnQcP9maIRggH++eKYd9fzjPiOyPnLhPPzNgcRjvEw+NSN1+GSYRQS\nZ+1VivQoqUjdMrXyWj0mZ3PWd9uJ494BHg4MDzZp/o0SaumGHFd4DRL+TzQY\nVfBtPD6PSbIlkBslpm22ISOJqyCejO9wByB8IdrWpWvtGfUjV43IjoWZEuQX\ndMEb79WGH7zdGRwOjH5ve5sm4UNVlgiOh1I4ZMws/NzE3Vu0k9XkH1uCx4pe\ncWTyZllK69XZ6gUwZVrwQQhWcWFwk+MDhMKWkdOUoCAneGbVcJVPiCRWS0gM\nPdydFYIWAEYrFoqdZgYWbbt5jEpyjvuPrGY/7xZdrr6A0+2P9gvq/ykRMJhz\n56t1\r\n=DzfO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js [![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](http://nexmo.com/).\n\nFor full API documentation refer to [docs.nexmo.com](https://docs.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n```js\nvar Nexmo = require('nexmo');\n\nvar nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo\n* `apiSecret` - API SECRET from Nexmo\n* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice related functionality.\n* `privateKey` - The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`)\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.  Required for voice related functionality.\n  * A path to the key file on disk\n* `options` - Additional options for the constructor\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `opts` - parameter is optional. See [SMS API Reference](https://docs.nexmo.com/messaging/sms-api/api-reference#request)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://docs.nexmo.com/voice/voice-api/api-reference#calls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#modify-an-existing-call\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_put\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_delete\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#talk_put\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#dtmf_put\n\n\n## Files\n\nFor detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api/recordings\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#vrequest\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/basic\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/standard\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advanced', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/advanced\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exist to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://docs.nexmo.com/number-insight/advanced-async) documentation.\n\n## Applications\n\nFor an overview of applications see https://docs.nexmo.com/tools/application-api\n\n### Create an App\n\n```js\nnexmo.applications.create(name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#create\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#retrieve\n\n### Get Apps by filter\n\n```js\nnexmo.application.get(options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#list\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#update\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#delete\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteConversation\n\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### Get Pricing for sending message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, countryCode, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `countryCode` - 2 letter ISO Country Code\n\n### Get all numbers associated to the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean refer to the Nexmo API  [documentation](https://docs.nexmo.com/tools/developer-api/account-numbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean refer to the Nexmo API  [documentation](https://docs.nexmo.com/tools/developer-api/number-search)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://docs.nexmo.com/index.php/developer-api/number-update)\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Workflow\n\n### Create a workflow\n\n```js\nnexmo.workflow.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nvar Nexmo = require('nexmo');\n\nvar jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nvar Nexmo = require('nexmo');\n\nvar nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nvar jwt = nexmo.generateJwt();\n```\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> !!!IMPORTANT!!! This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nvar nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User    \n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"167ea32fe8abb36b61282db788561feac71b0c9b","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.1.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.4.1","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.3.1-beta-1_1529360254767_0.4021234415673731","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.3.2":{"name":"nexmo","version":"2.3.2","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.3.2","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"b5625474985dd2fa757f457b3a0a610bf770ff23","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.3.2.tgz","fileCount":66,"integrity":"sha512-eu1eY9OkgbaqkYB9YMekRvTymd0dRtB5RqXaogazii72XK0DmxwI2CWoEGBWEsBfLofIpbJMtPRwC3jUSe5phQ==","signatures":[{"sig":"MEUCIQCSa8dgccAVS7GCJm9h+nKFBOqcJxnSPY0qdiUC7rrSLwIgNFxCz6e+vrSskVuzi75e9EPBuN8WR2AQcttiFA+cBO4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":776846,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbKDMdCRA9TVsSAnZWagAA/SIP/iM7AxfDGfMVtPDF7ufX\npUlMwWCr/XXcunk8v3/RmV5Z3J3c62SMkUxt/H0Jjb22yUPUge1O4VYOI681\n1ywPMSRAngLRDSOD2QY+QzZOzAS7iGQIqMTXVHtZd/ieWh2IAp2q6haUJ95r\nsJbbN+ocVHE6oc2X7cJsmamVzsI4dZXb+M5gDmlPt/9iV/sxHXQn8dQsIw7v\nUb3YrLuHbnpbzhPY9FwOtrT2wLO1aDqlEINmVWv7gyo4LBhY3tnMiYN/k+I+\n7GLZz/JFXA+LOml1rFmHw4XoZDAzz+Dhxu3X4/QDYCV4c0WIXAqibaPzFlfn\nCrf73+ghAZd/cnqwrm3jlzSPRL+0+LJeN382jtNbFUzWrnMihv1f/RBFuDct\nxzxsOx7ZLYkfPMZGETi8fOIs4ajRuklNfOff99PHqTfwExWRlHunRdq2whD6\n0sYQN2cmbdyWgbpKjEFuiPIoe41zdkHKZcWhtDLI/LYgITpZkWq5g2iVeEXI\nff/Hk0LVpE1q6YjzukfIRw+tAaNLzWLwlqZ8hBvO2P0iupuBVRF3BlkWj2tG\nWSpDPbTFYBR2qK49fB35Ud+BS62trs1VnvDETMIQhzyF1S7gqyRzllc/pKHY\nNBGQRZexaXiYBc1lwdryDsqkDwPuT9ixBOWyYRmEbrqNJt1ogAb1CNCksrvU\n3Tt7\r\n=acY7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"ede2e329b3ff2fdd8d58bf39418ff7ae2021ca24","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.1.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.4.1","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.3.2_1529361179842_0.23779767718942701","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.4.0":{"name":"nexmo","version":"2.4.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.4.0","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"b3f69f65c6478f18bf528b50b0700e5653991c83","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.4.0.tgz","fileCount":58,"integrity":"sha512-5Jy1TDj/RbA1oDgLEzL5jkZUWWPYnvEWTminzYtj7gsE0OubAn87JxGfx4768dvyo4tmNoZusu6I9lm98ejxHg==","signatures":[{"sig":"MEUCIQDzCwR1UREFZ1o9VW4vYzfFhBxxc5MeJuSf1xt9dgi8DQIgSgZYUNgamJIXp3SiJ1hWtet4fq9xQOaeDMBaZY7dBV8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":380917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrQKuCRA9TVsSAnZWagAA9r8QAJL91APJLZD5Zg2MSjcE\n9Z668CPRJirTMoxx2VQ0mudOwlkU80fdZ6sVy8IBKmX+w6lxXnFydM65ZxOb\nkvn+SLV28YYqmeYw5oql/YP1Vu1PEGYEv9AJBz6xdHvMv+8RAF9yXXWsi1e0\nUJavEso3vzZwjc4ZNbzhl2VeauZGuOpTrML3fsYvuvDLjlMN28b7jeZ+StyE\n6fvx0xzn85L8bfa3iXZoKlQFdz4MK3vlfKztiJYZce6hkXSgkCwVLrE9Gl3/\nM5wW9KroRzCSd5IRFjBBvqXF7fZoXJYh9pEufdAUw0KNF4PCnP5ogfvPe/t1\nnsei/n8eKlqTvy/VMjvEcQo5hXDgUIflXp9YzoTbTQk0MI1QVC5BsSW/xXjB\nJerwKlKe1j0vEinn1XReqMylgqP0UvQxCV4YqczGkFjYWh9QIsxW27CDelaX\nryxlbtKkzSv4g5l7EcJn7nbKbDmavm9hcnfrNbnFv8d9SGEztqzLAeI4uGHV\naCRnMLLR7yap67/ud4t4DUpDZVba/nAHt9iTRKTxcga2Ya4bkUdGh8pP9xLW\nQMDmI61IwXVvgozRx8ZuawYeqJmt746X3VANZaB1CPshfRrsOyvAbjX9M3Wo\nAC89Ca+97CEz73a9Lv/WLYIMv2R8i42F2DU93pTF9b9S6DtzmNGQK2auV8kd\nA8pQ\r\n=E0Ft\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"c748df23d8da5881fd563899c775e1ec0a8cca09","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.4.1","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.4.0_1538065069659_0.23216893978898012","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.4.1-beta-1":{"name":"nexmo","version":"2.4.1-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.4.1-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"fd8a00e4af2515592f14a92d6b5fff6379bfe4e2","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.4.1-beta-1.tgz","fileCount":74,"integrity":"sha512-xjy1u6TZma0I+nwjRlk3fg4Iabl5duzpQaKxGLDNyEerWuCbdQQ6DnnK9LjHfrwVoZ/OhGvZO0/SnpFNjZFQbQ==","signatures":[{"sig":"MEUCIHjyAcYPGIvt9FMF1RRqQh/DRQmy5JN2OrH+Z+fhPT+7AiEApBKz0IBv4qpW4s4Bv3xMYO1cWIvpXW5n/OoeXa+CtQM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":452964,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbvMuSCRA9TVsSAnZWagAARL0QAJGOXV4o5Zuw1hAj0TNX\nzemPPZn8qkW9q0MEfPqB2RL+lcNoKnMLm1JTtU9gx5+QXQWSkkKs/7e1yDk+\nwjfH7bz+VWlaSIRdYjogX2eCShnmLHTCe6gVHS0xLVTizecneRMaJlrSNmyl\nDl9v8Xzwpv+2l4gmO3N0ji3NDa5/666ycnqpiv381dzkUHoZX5/QSh6AoX2E\nQTIho6jpJOvGpxWH56ek/h+iLfL6mtvoWEAf5wwN4qQiwCYXHgwoSqrXnLKr\nsy4VN1Dvzprq0PZSTdWkNj6SoVXtrGL1CU/CYoZF/QHvyliFyjuBymn/SkSO\nkNmYCQeeFP87TBMW23hdcuibd0OVGNwQgG87XqIqAjHgNE2yvgSPNlqQTD4I\nIOTTGsXkdof5LcpIRvBbDQMFLOn1r5i9KuoYc1oAg262nKxMPJYoScfgGYM6\nY3XwERzB8PlzHMMIlUkuGyLq5XQvLFA0M0AGR9+vYdukW3FPrO7hDLrRICgL\nHI1I+Tg1Onb84YPGQ3CZo71BVrTTL7/bUSgiBsagBJ48+VKJ0m0h0yN1VAH2\nC72ummZMLJiGFnhxtiAuEgCtfG8WIO9azyNusiq2KKEnx7XVMD+PA1p8PmD9\naLaJ7DbKvG7btoN7kRl7+n+VY5rX45zB0og+cZClCBR05WwA/94res91xOz1\nBVdX\r\n=XS/X\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js [![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](http://nexmo.com/).\n\nFor full API documentation refer to [docs.nexmo.com](https://docs.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n```js\nvar Nexmo = require('nexmo');\n\nvar nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo\n* `apiSecret` - API SECRET from Nexmo\n* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice related functionality.\n* `privateKey` - The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`)\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.  Required for voice related functionality.\n  * A path to the key file on disk\n* `options` - Additional options for the constructor\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `opts` - parameter is optional. See [SMS API Reference](https://docs.nexmo.com/messaging/sms-api/api-reference#request)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#call_create\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://docs.nexmo.com/voice/voice-api/api-reference#calls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#modify-an-existing-call\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_put\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#stream_delete\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#talk_put\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://docs.nexmo.com/voice/voice-api/api-reference#dtmf_put\n\n\n## Files\n\nFor detailed information please see the documentation at https://docs.nexmo.com/voice/voice-api/recordings\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#vrequest\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/verify/api-reference/api-reference#control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/basic\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/standard\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advanced', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://docs.nexmo.com/number-insight/advanced\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exist to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://docs.nexmo.com/number-insight/advanced-async) documentation.\n\n## Applications\n\nFor an overview of applications see https://docs.nexmo.com/tools/application-api\n\n### Create an App\n\n```js\nnexmo.applications.create(name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#create\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#retrieve\n\n### Get Apps by filter\n\n```js\nnexmo.application.get(options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#list\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#update\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://docs.nexmo.com/tools/application-api/api-reference#delete\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteConversation\n\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated to the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean refer to the Nexmo API  [documentation](https://docs.nexmo.com/tools/developer-api/account-numbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean refer to the Nexmo API  [documentation](https://docs.nexmo.com/tools/developer-api/number-search)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://docs.nexmo.com/index.php/developer-api/number-update)\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nvar Nexmo = require('nexmo');\n\nvar jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nvar Nexmo = require('nexmo');\n\nvar nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nvar jwt = nexmo.generateJwt();\n```\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> !!!IMPORTANT!!! This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nvar nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User    \n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"ec5526b0996eae8844f5ddd8fb142e61b41d2d48","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.4.1","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.4.1-beta-1_1539099537412_0.42188695032517654","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.4.2-beta-1":{"name":"nexmo","version":"2.4.2-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.4.2-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"8258c60be571b071f375de8f924f283d42ba547c","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.4.2-beta-1.tgz","fileCount":75,"integrity":"sha512-L4/KHq1NWOkAaCWeB/exySg+zZ3BqbJS8vkPHqa/0rxBL5g4Loxoq4pqL7PsMjcKlPeb9vmK1AITiJLcxleqUQ==","signatures":[{"sig":"MEUCIQDJKCKf4wRRuERtPAl/3HiziGmyFXX+l99MuQQKjnj5cQIgco+mx78nxlAWmfifvyJp3+QMBBX5lgAo0zqwJpRtePE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":455230,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb8tXNCRA9TVsSAnZWagAAQJ4P/iW0C1PCvASSo7wu62ha\nlJTDOHwest7Eocbmts58J7D2OGUaUvJgeMGNNaBIz8UI7klPe9Mp4ZlOsTpV\nMHwsVC+XvauA+RqtIistomWKwG6qwN6lPRZn1EmGSSoZe2hW2h6jjbP+piQg\nrw0XQ5YzpSAQ/c2dLjRKSn/jnOCPhgaHDv6UU1qMHTTdyox3q1A6TprrgRUm\nHKnWEYph07G5jeoKdPmhhlkiHh6dBLXboPSMkUIQ4oHJtXrLuTsTG/CnzLVR\ny8WHen78JTTUaQ0zOUMyBxV2nfs9CCmN+RqruHv33Ymjfc7a4R/2NFjV43Eq\nOo31p31tMsXsfbWXLlj+YBb9+q//fszjDwLehndtkMkuBg5InrGlB9xWbpvE\nUMFKEUlQ0EDi7Omy4kChy7mUSnP9eLF1A2lUUxxfmwNXAwuxHxj9zHslhnmn\n42MoumpQ//Hib0CiRfjIbhZPCUQXWc8pHIwULYF4erthw5ceCEqIWG9Vw1Mm\nHGCeGjkUVR9feQOX3wsaqHnUsxTNer4QORiksebx8jFt9Q4ltaryTc/Y7mOX\nIxR8RfHkzv8yPMIKoo6ILXBBJIo7lgdF3OIwHKnhZEwe4GpAgahyBYcXwOEG\nMaAnJ6yrfM2iw3W92msXYFZ3Wegrny9w9pW3ZUSU7sRDRbpha6rvZNX0Xyq+\ngZ/B\r\n=Klyb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice-related functionality.\n* `privateKey` - The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`).\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.  Required for voice-related functionality.\n  * A path to the key file on disk.\n* `options` - Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `opts` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advanced', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#create-an-application\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#retrieve-an-application\n\n### Get Apps by a filter\n\n```js\nnexmo.application.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#retrieve-your-applications\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#update-an-application\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#destroy-an-application\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteConversation\n\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean, refer to the Nexmo API  [documentation](https://developer.nexmo.com/api/developer/numbers#list-owned-numbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean, refer to the Nexmo API  [documentation](https://developer.nexmo.com/api/developer/numbers#search-available-numbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/developer/numbers#update-a-number)\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"7d025cd7e03ae9621b439e3298a7dad523366815","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.4.1","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.4.2-beta-1_1542641100479_0.1113206716475883","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.4.3-beta-1":{"name":"nexmo","version":"2.4.3-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.4.3-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"1bebd9bfa95004ad30e35b60ffd46cfd1380459f","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.4.3-beta-1.tgz","fileCount":83,"integrity":"sha512-Yd0O770EixzaFgW2oo5WmuTm2a4GMhgYvg9lQ97uch4pN1ilIwTUHIZ8bZ2UKnVrPnSQiBvPQHouw7CMiaSY4g==","signatures":[{"sig":"MEQCIAJSwrn55YgLgLuaYmPx6xsw/a/ksq7sKPi5uA6iKBYiAiBV/1QwJctyNIPIl30osCqS5kFvFPErzHkHsA4afkvijA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":513227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcHUwaCRA9TVsSAnZWagAA8qoP/iPb3BYFjTRknXJHe6q9\n6fsTUIm9Tie/h/Eq/IYI1FUEFS4y/pXsuk6l2ioS7v8EvhxmAC39Hl1nz8e9\nEo5KjksMqpwdhBHT/ra7nAs7vwfIVHVSwj2VzhVS/cESCMdbEAG5UH7mmict\nmKcDn5BGyRnsm+8Y9l/VM9I3AEM1Ibl2Vmqk3ifQBsbpokvrHddQy0nMlqcT\ngSusN2HlcX1YcpZmXhdnm0c8KgakhuLs87WRXo6GlEiLD4N8YKNlLHFh6hSs\nI1my7fjA0ft9/dqYAy96nrpi8Qz6bnE1FeXgVB65txroUmVvMMeN7KKIVGOe\nSrZBdlnDU/AVONfQJwL7wphCGwTAZPMMoSh/eGSpfonrIizCvnoRG8uGHkqk\n704/3TVV3gMKTE1GHkK1yBRCz80xBKmnXwmVSoG60kdao9KWojvyDWvBEjcP\nbM2NlDrFZCmLie4+47B4ba6I6QTLRCnwHf0PkQguv9D5j2bMAubZUW3fLlW0\nDTjUae4s2wDWLIgnq6Ovs+TsmQRg6X4eu3fXUAJBzUWleLyjqMlBDsQFr4Z5\n1k4g9FDuCVKmeO683coV+FjPjdQnWfABduQYm+HixJkAhWXn7S/tAnhaYZgz\nLJrY6wxnOxK9T0RZl2581rWltcXisvXJDNureK5eVEyLFQ0v/XoblPJ4B2PF\n9XWK\r\n=xPsM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - The Nexmo Application ID to be used when creating JWTs. Required for voice-related functionality.\n* `privateKey` - The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`).\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.  Required for voice-related functionality.\n  * A path to the key file on disk.\n* `options` - Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `opts` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#create-an-application\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#retrieve-an-application\n\n### Get Apps by a filter\n\n```js\nnexmo.application.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#retrieve-your-applications\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, name, type, answerUrl, eventUrl, options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#update-an-application\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application#destroy-an-application\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteConversation\n\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean, refer to the Nexmo API  [documentation](https://developer.nexmo.com/api/developer/numbers#list-owned-numbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details on what the above options mean, refer to the Nexmo API  [documentation](https://developer.nexmo.com/api/developer/numbers#search-available-numbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/developer/numbers#update-a-number)\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt, useBasicAuth, headers = {})` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User    \n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"7060000f8b9504eff40845a1bbd93f7c8d1306fd","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"mheap","email":"m@michaelheap.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"5.6.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.0.0","dependencies":{"uuid":"^2.0.2","request":"^2.83.0","jsonwebtoken":"^8.2.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^13.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.14.0","nodemon":"^1.17.5","bluebird":"^3.4.6","prettier":"^1.12.1","babel-cli":"^6.7.7","cross-env":"^5.1.1","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.15.2","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.9.0","eslint-plugin-prettier":"^2.3.1","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.4.3-beta-1_1545423898057_0.9469802568903418","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.4.1":{"name":"nexmo","version":"2.4.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.4.1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"a980a04f06b9d8d1333084c0d15576b1c1f1ca36","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.4.1.tgz","fileCount":64,"integrity":"sha512-/UhA2D9zf2V4dx/e0Gbbf81I3VAsCAVrx27sGtOftqwnkS/zML9D7+DjHS02tx6yCSP43ukzxTmqHXINlE+dRw==","signatures":[{"sig":"MEYCIQDTEGUn0yrQg3/9qfrF/hARs8LIv/t77Er2O5SHZQ+lzAIhAJT0FdVh6/iSQa0/Eonff+OFoWSN4E13pamMvsmYDWlI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":424704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcU0TLCRA9TVsSAnZWagAAln4P/2NwZ8qaelWoiQcGD0TW\n5KmXB0hjsMGxgk8PbJX480Eg4yLPXJdQIod1XSQSX471QoYBXMI2DdRuuhMk\nC3VCA2ngV17OmtmRZD28MTjvxqvNbT0FDX3uwNb/IjmCpUvbMK3VNe0IMqrA\nBMuSlgKThORZZ1dul83q2zOu2PQncHd0IciPoVz34VSVaWJQ/ytfx0jPSf2l\n42QTtklv0FRwKWC3EFQ2tmU3PuvgwLXjPTobjSM4DO+kp3kxVps2i6zTVVRn\n+9h/zApEDNJBHNwC4I4ElUaizjfpG04CzVru1dzQgRp82AYdnoBH1uUyZcyb\nJp6f1xavQM3TWQsOatGQJ4o4wK/X7tI1O6J1UnRfkEF2800v3s6q+NUvigRp\n0T1K+x+KBFW5jAUamsA/Jd3ly2chEGW4lJGkcWCaA0SGGE0aAw9XeCzN8XlN\n8i7y94waGxEjUicq+YYCCygkb5WaPi0T7QV8iHmhSro1R0XNYLMAwnQXX9kn\n7mY1gQjt2LxReuKexOQtwkFppJPaGNjrBf3z7bhMugtbSV0TQxqffhQRNevM\nwZ7OsxEEewT7WuM4/eGszBvM8ldS30Hcm1VX1Oh3CVg/3zx1t+2JwLaU1EPi\nuq7mNMZRssofCaRCPKwF1MeAT1yU6PBphtAhimuvvCzV20IrENrZrWo7NPfS\nmI59\r\n=PzTU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"b4a3973b2c22d1fb1a84bfa72fd65f1bb297d209","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.7.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^13.1.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.10.0","eslint-plugin-prettier":"^2.7.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.4.1_1548960970287_0.8067221485718497","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.1-beta-1":{"name":"nexmo","version":"2.5.1-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.1-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"518551da41eaa814ce595e8c6684fd28e3bbcc57","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.1-beta-1.tgz","fileCount":77,"integrity":"sha512-3s2djgQBapi13GjDnt1+YWUOuPXvh9hwWufpn9GaSaLk/ql27DviBOZm6oGO7576UaFrlKOVvLJ5e6AjFgwf4A==","signatures":[{"sig":"MEUCIEr7Fijzo2DanqjoqkhsSdV3RHfSKUNdajSAohagLhc2AiEAiJo/b5JdcJ8d+/1PFwsQpJmTeUYMe3l68ywcQ+etEQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":891651,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEiCqCRA9TVsSAnZWagAA5mAP/iiERU81/pn4ujKw1W4d\nFcLXThy6ATAMOoEOTP7c9jja5CDf1Rvq4pN81iuTcuWZkmCJWnikGfjPLs3J\nzGvbHWdyCYXmZ9uMsN8V/Ob4WId7UOqIYsDZB8+KdQpcVX6uIQN4xmcncv5V\nZbV7pDrZrIxblOfw1UaLZ9obYQ5ZQG4AiS92JuHE9OolGnTCTxyAQ/BylXbF\nZcoJZBVHHo423mL9zTVWyqXf+MRKHHRTq7ZWcOZPYLMdfcCroCK3M1e9g0Wc\n/aTr8VNJwRjhPI9HlTNVRK+TVx+Y+EqOgE/NT/rveDw8mytZCnl+/l9Z3+pT\nfvamulX3Dhxo7mqixRZjp+YL4VAnuH3zClw6eP4xDHC2YwtAY79gIhmaBAHF\njBC/BhcDuuFaVts0cp7zTjjItXLTa5aNF9Fu/343StIiL9d/gutoI4QSKIbE\nOZD+Z2t+mI5H35++vbSPW2Br+EBci2QthoaM8Mz5Ibbgf4YYBiwHN8d30aoy\nW0vctBfO8HL8/cooFMXxZtf2rDhdHnoersoVSYmGFNRsYSgBUDX6Ilrvu7eF\n1x/oo5w5BapoTcHa0cuJfFHbsxewKoZcuvLA5iAS9tS93P3QblkI8gMWJNbM\nZotdN2NYg0A5pGPAPsxixU/6EZ10A4pF7QN5KKVt0dNSmIXYAn1Qrn7f6NpQ\nCUdF\r\n=ZJnT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs. Required for voice-related functionality.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * The private key as a string (It must start with `-----BEGIN PRIVATE KEY-----`).\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.  Required for voice-related functionality.\n  * A path to the key file on disk.\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteConversation\n\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"81b140c6949edf59205239c177418ebd2f595c11","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.9.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.0.0","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.10.0","eslint-plugin-prettier":"^2.7.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.1-beta-1_1561469097023_0.766253475993971","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.4.2":{"name":"nexmo","version":"2.4.2","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.4.2","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"12187611c85e490b22ac8d7c639a1bf49b0f561c","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.4.2.tgz","fileCount":41,"integrity":"sha512-9DYMSyKgVunboK8hDb6wuFawXfNPGxfooQs7mv4m5DWxVywtAx03PNYB7GUqZWwevmH9iGwijlQBVPgachmitw==","signatures":[{"sig":"MEYCIQCtrX4WhyAhmC+XXPSVe8bJNt+jnwdqVbuWVSEe3Hhn2gIhAMQNCRElmivVm07xRh9JK0k+o0ZVSspG31Y8u6uHCVBj","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":380398,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdcNW7CRA9TVsSAnZWagAA5z0P/38CBnnjtTflXsiC61al\nk2yk3ItwUWgBqHUxE0Ua35JHF6KLpuj3qqlRquAUD2EdleJH2zuzW7o3uOL9\n/Wyxkzkb8Ap4k+8fLvbkO69zASx/cjqvsrJnqEgW33xgqbJc4XJ9W4Qm0XT4\nmwnBevn+PEKMEv4HkAXLPbbD2rOb+eaM3WyvJaVailL1Ni5NJCYUCAFie7W3\nA5srI8A/cg3/NjXBSI6qHd9USAaJvHQnTar5PUciCZHuqMtGWgy10TBKdiAv\nI0bcbMLpKF15o7KsLX5b26QEE5kJxN54FcZJKDRECBqh20hboE9ku5ifLjAS\nP2/HiV4LFDI0Atxj7jF/cHzZljpl7dVUn0j6FpyCg+rkIa0vAM8Sxy1+xyZd\niSvr2OA8rlGJixOjGuFrahR7/6p1qc7MoiI4zrC4ryxonkyGGFaM1oXTfWrO\nU8dYyTlXkU+Fr+1F3Di+X9NJAVbg/xSsP1enGLmPHVaeu2QW1T8JNKNs4EZa\nSV90EOyujRiAE5j3DwWnxxqApSkVHSMBkn5yUVp0tx+Ghz3bR1DR0l+DxzwO\nbNqQsb8ga8kFBlTsExB3a24lCQYWCoaYl3+VZ6jvHPr44SOPCNR2OMynCJJa\nDkNrMcf26PDctDDQ0w+Z72PYw2q4xxX/L95COXLDhz3+995UuwZG1yynUxCo\nSYWD\r\n=jGwX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","gitHead":"125c1b37e8d4e1149217c7ec1a2ffc820c7b571d","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.9.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^3.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^2.10.0","eslint-plugin-prettier":"^2.7.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.4.2_1567675834377_0.11608470567937257","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.2-beta-1":{"name":"nexmo","version":"2.5.2-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.2-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"6a787ec16b394fb558ce63c93eb41ba15309a2db","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.2-beta-1.tgz","fileCount":50,"integrity":"sha512-mppZoGAkX5HhGjUAURstmSWw/2OUa8ZHeHBQRbhdPkULGSNRR13Gb3t2UhMasahIh53pcV6dE9cj3M9vjkIidQ==","signatures":[{"sig":"MEUCIQCVH8ts0FgSqvzpWwa2P5iS03t/K92Zne/U/VXuNKEAJgIgQ0VaPYyRRo/Jk+jBoxfvTJhLIRLMtmFDrAV6w4hYZng=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":408808,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdegJ6CRA9TVsSAnZWagAAXuMP/0fdkk/i3bIdghFNNsTx\nHUgNfARiOZopQjJzrVce81NrRkl6uUjmdmb0RoAmXNp/pDLqeFBhI1cQ6u//\nDxuHF1jIbcNvsaMjjjDUm1aB+qYBqWVNzRebabnqH8fA1+6pcw3ocyNQpeug\novNjs2yWi/nVGrVC7GigR826hkZep927cXxkWlC11GUrspQuzf88E31W9CJC\nP/ptXLMEAOf1tupfmFFolevbvuyj5eyFmcdBW6zaIkinBYPk+UeEjNPR7DB7\nf3tAjJIBffEdGugtyEu3bj/tw6yXOm9m2SCQSU/356q78qeSEnBc15Pth8Av\n2l0rMOyeikDIX5FU1RYnHchSAxy/CxUtowIKxb0CySznUvPD5S6JsbUjBNDL\nd6UIGFqTQ6uHWED9PrFSTa6C1oYbg5bfowX0k/denb1wa7S7icCmK3MA0dnz\nVJrapqbP8IOGqTjDE2MXGQZ6CO8cXnmJPeOuEJyQZSzszzodMwxcyt3LQHMf\nTEq/TD+OYqsACjiSVrXM0izJxv0nS2aGfVNPEcBhWd59P+H3VVYGcz8IIyk2\nBMH36QTIFTRnH39lSFjKo8mG2E0+kwR0L8IZF36FBTxZuuyCNdNtCHErEVxd\nWCBATpeoBZq+0FzHn0VvIelMKoNrMgkCdgQ0svRutOqS+xJ8UbMxSwxy1yU3\n2Z17\r\n=TrAb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#replaceConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteConversation\n\n### Add a Member to a Conversation\n\n```js\nnexmo.conversations.members.add(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/stitch#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/stitch#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Add a Member to a Conversation\n  * [x] Get Members\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"2f0899866eaaef12a21e27641147edd70f84b2e2","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.9.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.2-beta-1_1568277113384_0.21150540220579472","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.3-beta-1":{"name":"nexmo","version":"2.5.3-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.3-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"3a2545ded75eba1e42f38a97d3eaf4e7d5c11801","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.3-beta-1.tgz","fileCount":50,"integrity":"sha512-QIhmOBe1G57jQFyI++LCllXErZb1sVvJ5HaHYmASA3hxzsCl2sSYG+rURTUs0cKhWgbGW7N90vzqPfXNsk473g==","signatures":[{"sig":"MEYCIQD7v9sY5XQWiAEfTRaulmfrR6L53R8cio7r0mllUuHJ2QIhAKRal/TWr5IvP4atY0uBD4JRTP58Yc90SDWpJptTGhHG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":419003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeyf0CRA9TVsSAnZWagAAarEP/3R/Vio0r4i/ZSjtelpl\nLwP7ciJTnrR8XbisIdDtwat4GLd5Qe+YNanNWgeI6pDXeqkSuuwC9LREwg0i\nR+kUIRxM1IrUrhRbAEjuEsbFm7nkRZE/I0P0cYUD8HvQHx+huZ4bWUG/TB6A\njKzeqE19fiZELm7mfBvSIAoYoofNG84ynC/1TQKUyDYSODeJQ7fZSpLHFLnK\nXt0RkCyLhmU+M0V+FHofbEudYkPBLOdQ2Egjpv2ew4MTaoxYPM6Nc16teXfL\nVMXMROlm7ywvo8CGf7MYo588vadB+YbcYX7xMkLFWbBsI+YfwDQ5EF2Szgt2\n/DmKPzrwOBxyNEkrEXJsmkdqOm02cfHzdZn0sLF/JFjrsOIPdnQ4iW+DJWxg\no9I8B3/QiYGPKr9Uk1D3b4uNlV8260DLzfgXr6KjoZSUAsd9VeImgdUhWKlo\nPRgJvuONjlCy+Pam0EhjSLpcljGBzvfdDZTnWoI40opM0/88mDYQ3xTJZyay\njFTuX3a2kk5JoOjzif7tboL64RJYVM31gjUrGGTsmMB/6uXlkxIyogbpBkt5\nM1HFC6ddc/OQJtRRavo6aqOg1+CLOQ/OSAQn134FWvYibVsG5EPTgvRTkVQk\nYPp5C4v578vYlspNW6LpyRjK19yexpDyg50WpFn4HqlsNCfEtCWfnxW3GeyE\nLTYg\r\n=Mlzf\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#replaceConversation)\n\n### Record a Conversation\n\n```js\nnexmo.conversations.record(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#recordConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteConversation\n\n### Create a Member in a Conversation\n\n```js\nnexmo.conversations.members.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createMember)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMember\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMembers\n\n### Update a Member\n\n```js\nnexmo.conversations.members.update(conversationId, memberId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#updateMember)\n\n### Delete a Member\n\n```js\nnexmo.conversations.members.delete(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteMember\n\n### Create a Event in a Conversation\n\n```js\nnexmo.conversations.events.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createEvent)\n\n### Get a single Event\n\n```js\nnexmo.conversations.events.get(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvent\n\n### Get Events by filter\n\n```js\nnexmo.conversations.events.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvents\n\n### Delete a Event\n\n```js\nnexmo.conversations.events.delete(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteEvent\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Record a Conversation\n  * [x] Create a Member in a Conversation\n  * [x] Get Members\n  * [x] Update Members\n  * [x] Delete Members\n  * [x] Create an Event in a Conversation\n  * [x] Get Events\n  * [x] Delete Events\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"17d40296c827d1126c53ebbe96f1fc4e19bd43c6","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.9.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.3-beta-1_1568352243953_0.4861994721384615","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.3-beta-2":{"name":"nexmo","version":"2.5.3-beta-2","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.3-beta-2","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"35604d1095eba644c53d98b3749ba5d5490f65ab","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.3-beta-2.tgz","fileCount":43,"integrity":"sha512-yF4DUbYWTv846QCn4U9ChRpSP7shE4Cxcr1qGAFXbgUgRkehn4lSdENDLATjgl2m8Qj1M9v0RUuZ3PDiyL4z0A==","signatures":[{"sig":"MEUCICmSyU5KLHR+9cbS5n6jeXMrQ5Drgzep1dG6Cqest9RwAiEApdGL7zcc6hNsy5xvt0EF6x+BvmROUkOK1pC+CAFRm4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":410913,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeyjMCRA9TVsSAnZWagAAX9YQAKGKbqKecjY4oPvIlPNq\nUc+QyJoqYwou3fZTChkMZ8LCWdQThJrUqVBNgGFijBEXd/MwFcYAOZvuQ8ME\ndUo7i4MfF418RTLobR/S/+Z/PkNJEC2VbNvap/UZVjh1gkIHBE/+pW9HGD8L\nwJWEDZ7UCbAZCjqiTVfd+IS/kmNSxypMGICFJM6r9PcvQRWrA5x2FP+2lhgT\n9SlHOFtuC9lwNIthaQwoBJX0HtEuY0reQ/0F0lLzNIBq16uM++tRi1B3sUG/\n4ai6QAzTPHLnx7emvMA2L5r9Mq+Y9n3UaNFbUIw7pOKOlexHyNORjL6a37Ly\n/1eC9s1whsXRKQhR9sSQlkLVIjIMyOagOguV/Gf6JsL09Av2EMP8pCUAtaXz\nMZH9o6LkugIx+ULfmAaQVHVsJQkEGJIAtGjDfaovrkg0pHyn14Hz4nLqzrFk\nI1P6Dd1yZeAmNn5u+eA6STKevlIXuZhhswmEUDWXJunquxBPkcmLpzmgass/\nFrFfLqOIUTo/g2Djuf9c6mGC9BHtFZtAXt3lmRDjwO1I/TiVBDJ7Hg7y8B+E\nyCG0RI4OWCciaciAmI3R/nwr2e+9a8sFdO8zOqz5rQPooWfi+F0qVbdvAxgk\nudQfherSpMhohmsd8BO0AdrLsfJaXj7K5RG9RuV9iq6YUWDy46CPaa/fbUgW\n8Xhr\r\n=SIx6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#replaceConversation)\n\n### Record a Conversation\n\n```js\nnexmo.conversations.record(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#recordConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteConversation\n\n### Create a Member in a Conversation\n\n```js\nnexmo.conversations.members.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createMember)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMember\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMembers\n\n### Update a Member\n\n```js\nnexmo.conversations.members.update(conversationId, memberId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#updateMember)\n\n### Delete a Member\n\n```js\nnexmo.conversations.members.delete(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteMember\n\n### Create a Event in a Conversation\n\n```js\nnexmo.conversations.events.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createEvent)\n\n### Get a single Event\n\n```js\nnexmo.conversations.events.get(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvent\n\n### Get Events by filter\n\n```js\nnexmo.conversations.events.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvents\n\n### Delete a Event\n\n```js\nnexmo.conversations.events.delete(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteEvent\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Record a Conversation\n  * [x] Create a Member in a Conversation\n  * [x] Get Members\n  * [x] Update Members\n  * [x] Delete Members\n  * [x] Create an Event in a Conversation\n  * [x] Get Events\n  * [x] Delete Events\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"45394c58fab2b98d78df0f3794d5651317e04614","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.9.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.3-beta-2_1568352459864_0.8252777475772961","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.3-beta-3":{"name":"nexmo","version":"2.5.3-beta-3","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.3-beta-3","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"c781f97a785f6bf67e95d81a3adeb947494f9337","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.3-beta-3.tgz","fileCount":43,"integrity":"sha512-8klHQmXAtmVDU/39LRhPf9QdPLGo3OVgLdOYfF32ZoO0bCG38Y/yxbqaAYw0ezdJk/ufzv7lEVtC1nggYeROoQ==","signatures":[{"sig":"MEQCIFmfIoy3eEhEtJqzSxvpZF0vtHEVo4MYb+EYfu4bnNr5AiAYwOZf5DBK6jz5E4BOvmqBgaWU+moX6uI9eyqIfQsikg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":411172,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeyusCRA9TVsSAnZWagAAobgP/30xZTzEUdvKjmW8ws1K\ns+qwqNYVyG8EOL2gGtW5BQuR3HUbcjgH6M7zBI3lUb931/Nh3HMlPl5EhjNn\nRwJ7tEhNqZSzQh+OY7TzmD2E6PrPznqMYLHYML57IN810Hj9BGpMTG2AqeHo\neN3c4iPOJv57bR2/zKvM5F2HaOEHlRn/3KSn+QyoYpKS8FuftvKUi3vEafE+\nPQ4HaZRmugKMsmdWmxjs7nqfR4VW4BiyTvzKWsx36qR7pff5fb5/I8XdvIEV\nXoDGgyD3QjqQah0zVO48y/wJ990mf8FKFhzAnVJaZ6ae/ldkJZpCYwAbiGTV\nMsDLE/Cxv6s9626zcXGIq1VMV/f67El7j618Wt7RGNJzM7xT+v5l4NFaukWE\ncN0zlHgpjVHIw7ePIi6UW380wQIRVr36S8PG66uz+VuQZtrpFf8pZTAbCPHm\nRlZ+ZU7sbRwoitz+aihACKBI37pkWXoY680cq4UhBrrFspvqhh48hRE3NOal\n6LOWXZ8AV0tvDMv7FGJl0W2Q1XR8OHrYTQ980kUkJj7bF7nrCNirCIEAaw7R\ncnSeuWu7PnjvAiLbwDdtDt8LppHkcridMHEhbQiwl2+g+03TRHloOyzz/uUT\na9BPy85nlCgTDm5HDhL0ds4LUlGLsVD3NWX4g8zzJUcDKYGuRgCJiA6TagKR\n0qLy\r\n=VU8m\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#replaceConversation)\n\n### Record a Conversation\n\n```js\nnexmo.conversations.record(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#recordConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteConversation\n\n### Create a Member in a Conversation\n\n```js\nnexmo.conversations.members.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createMember)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMember\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMembers\n\n### Update a Member\n\n```js\nnexmo.conversations.members.update(conversationId, memberId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#updateMember)\n\n### Delete a Member\n\n```js\nnexmo.conversations.members.delete(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteMember\n\n### Create a Event in a Conversation\n\n```js\nnexmo.conversations.events.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createEvent)\n\n### Get a single Event\n\n```js\nnexmo.conversations.events.get(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvent\n\n### Get Events by filter\n\n```js\nnexmo.conversations.events.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvents\n\n### Delete a Event\n\n```js\nnexmo.conversations.events.delete(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteEvent\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Record a Conversation\n  * [x] Create a Member in a Conversation\n  * [x] Get Members\n  * [x] Update Members\n  * [x] Delete Members\n  * [x] Create an Event in a Conversation\n  * [x] Get Events\n  * [x] Delete Events\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"01950a0e8ef9b60df2186368c1e4fea04c9ba521","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.9.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.3-beta-3_1568353196316_0.4151155011092964","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.4-beta-1":{"name":"nexmo","version":"2.5.4-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.4-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"a8ed28beb5076ed533ae93722a327e0a1f74da97","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.4-beta-1.tgz","fileCount":43,"integrity":"sha512-1Wrovjp6IVpnTuERJ713nbrrP/q6Rab/k+CcUyGZjVrlQHxy7U4Sx+k+6yWZ9ggTcIRTAaYqLJOt/iMvDnbOyw==","signatures":[{"sig":"MEQCIAEuDLp7ELU7ZJRCRgeQiITyMLZsRWU6bDN4h7NrQJyjAiAHkAy4q0WwwrSSQYKcw7YqPsUk6Gdi85OY6eJlcDDHTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":410880,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjKWDCRA9TVsSAnZWagAAoXsP/39svjU68Gpg8Lt5vqr6\nj1+iO3KSq4UWxS2DjA5ZtuiyUhLUZ7JbiUG3KYWHcoQSnXEmos1vMKANc7YQ\nrriwO7m0ruAkgAMFhdZLWazjk1k4qXfSJoMCP5zH8TTJGIgoTJNFJgINWHlu\n7gh4ROozmgR+scoODQjZOLJ80e7BycDJopkkauCchq7OspS9oFaMMDXvzWsk\nTZ15EaJX0xI/Yha78O+1Sv3+/vju34Y1fUyh8sPxsTukbSEeAq7JERRIGtY2\nIoPTxWRYv4sCCmwf+33f7BLFiymStU3KxWeTCswHfV/ShoF6JH+F8Lseeksq\nuE7eg21H1S6NoCt/zynysVUYeEJ/g+zGTZZmTcaS1fWgAGVG3mYKS6rUaom0\ntsptbjKzo5h+6xJZ6vujtDYx/zc/si40QgDiipv4LlKTQ96FFOvqupm2lFT9\nN1O+0VZFE4Bpj+0LKddj3rBcbYnWFd1CUEeKZmDFPBbI6ePBRFdlFGEfpB2j\nZ9tV4rDz3no8pDOwVCHjNnw/oZK3nobakl3tSE2T1Z6OAoqUlUB2GYsJUxWJ\nGE9pZtJ2WSAfizSQMT3jEdmos0+Qn0jIWxD+7VuJWFFpiR3pmF04yxGkuzdJ\nfkupNtYRG97QCJeNiyl62VKa5B1a6Q55hHgVYPddgAUniJT9b1QIbLmB3PqL\nOQ6L\r\n=1kbC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#retrieveConversation\n\n### Get Conversations by filter\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#replaceConversation)\n\n### Record a Conversation\n\n```js\nnexmo.conversations.record(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#recordConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteConversation\n\n### Create a Member in a Conversation\n\n```js\nnexmo.conversations.members.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createMember)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMember\n\n### Get Members by filter\n\n```js\nnexmo.conversations.members.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMembers\n\n### Update a Member\n\n```js\nnexmo.conversations.members.update(conversationId, memberId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#updateMember)\n\n### Delete a Member\n\n```js\nnexmo.conversations.members.delete(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteMember\n\n### Create a Event in a Conversation\n\n```js\nnexmo.conversations.events.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createEvent)\n\n### Get a single Event\n\n```js\nnexmo.conversations.events.get(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvent\n\n### Get Events by filter\n\n```js\nnexmo.conversations.events.get(conversationId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvents\n\n### Delete a Event\n\n```js\nnexmo.conversations.events.delete(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteEvent\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUser\n\n### Get Users by filter\n\n```js\nnexmo.users.get(options, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUsers\n\n### Get all Conversations for a Users\n\n```js\nnexmo.users.getConversations(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Record a Conversation\n  * [x] Create a Member in a Conversation\n  * [x] Get Members\n  * [x] Update Members\n  * [x] Delete Members\n  * [x] Create an Event in a Conversation\n  * [x] Get Events\n  * [x] Delete Events\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"1d9a6a4dc245aa5a0874170106ccac219c344d4b","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.10.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.4-beta-1_1569498498869_0.3599748240252483","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.1":{"name":"nexmo","version":"2.5.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"b0f8dcdff6782b8d8ada4202cc1d9cf8c25c72f4","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.1.tgz","fileCount":44,"integrity":"sha512-TkZZPx76ERV26RSNqUGplMmhTwmnEN6EpeEmWiy/QgNoVoE/F4kFeEUzv9wlGmgs3GRMjHE7Z7wYTF6MPpcmTQ==","signatures":[{"sig":"MEYCIQCfwNdKLDtdWAmPenC/Xgpi4VhzR5Su0nFzuIJgTykJCwIhANAgrlPmmmqDbjRodKBISKIQ1ZrcBrt/mc2qnufu2xb1","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":404234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlwT+CRA9TVsSAnZWagAA3R0P+QDR2M94Yol6pPe4B2PR\n9eg0Sj1dxBqDdMWZ+NDzT7vtkunOr9jdOVCJ7nKhcL5o5g0Pz9+toUkPB6RL\nstlgDO//+9ktrFEFo5jRwXBEQyYzJKAzckqQ3X08xzOCqefRHY92A0WCMY3n\ndjk9Afyt8MHNfcDUP1hCHwdEnyI3fPIbInYGx/aPJXyjgjE4/+2gME5AONcv\nRkRWvdxxrngei3PHCTIqp+ngO96WEcDABSncgky5BAHZm2cVVQ6HeikFe/Ud\n2zBKUrAEXuEg9CZHL24olKSZ6SFZdxRUcLC7tOb0gotEijUA6+ttYjtSQ8/t\nungQMhd1efkt76wKXpla3rmmDU5m85ry/DHR0XAiNX4TXuKEfOEcd+mDUwTv\nYfDA21YIh83NMZYHHUPfGJFUpUa/pkRRruCsETnyLy3rUrgtezo43CO+ie6A\ngH8yzhB+1Gny7ZweILz/aZ0mPnIXzwWEBxfyJprt5vBV7oEJRbX0gZfggIHB\nWu32ewmTq0yWUDn1dkYFChAPX9xMDVrsIzKNhkNlGuIqIyXUlwgm6sAjKzLt\npivqP5VG5ntmOaoRXZCKHlgord0riRNx+WWnpiaRfkOh/fbXDfGuB4ylH0ST\nsstZzlaGPz9Pv9NOhxt/DhdapnrLzmLmiF65tgyI75yMlIaMqLuJIoLelyqJ\nte25\r\n=jvds\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"5f9680a998337cb050a586bd60c2d4f185e38848","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.11.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.1_1570178301822_0.5519108789743863","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.6.0-beta-1":{"name":"nexmo","version":"2.6.0-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.6.0-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"a8656d49625021824751a844b704ab76300252da","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.6.0-beta-1.tgz","fileCount":51,"integrity":"sha512-ejxev4salhDWdIDx2T2F56U3Rpx/aSpAQbhsOKkwoH6BM96vClh/ka3tRGolHcAgOz6fgWyVr8XD3PlV+sLT5g==","signatures":[{"sig":"MEUCIFi41ydDU8V4AmutrmGVIdjErsOVsY4W+TOmsxpvDBD/AiEA6+2BzynSbYu0avGl9JJeWYN505cJM/rPnodEHo4MjUs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":487196,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsyVxCRA9TVsSAnZWagAAL20P/RO8AsKDcxqp02Bkyb7K\n6GdIl9C3nOISncEF/HFZMJ7t765f6+B/SsofP7rZ266SxJVHRHZJEBj/GPvX\nNCfcS5ONqQvOCF1SFmU5fDuOXsDM3BiIIBBlzy0GWm9qq5wLhLxa5+j76qpQ\n1LNJ06hQNwJEynKGsBgj+9qhNCa8QHAfEgimdAFTkWu3SfMTNX5Vtmr+HzHS\nhVOAzhxEfKhjFtNP5qDJabPgwNhDAffuFtmJRLDDWNQbQJJU93V3U8/ML4cY\ntaXPDO5Sz+hAmUr6pJXEL2Dl5OB+wImEoPMNZ1WK1YmHoUeaP938CjubGsTg\njidWXy66fB3RUN6fGDxWRwo/Uwj5zXTSLb46uwZomzmsUfV+r1pAZb4+SDmv\n02Xo7FfpGXtcLL7vkPn3arQ0Ex87IBR8JO3xM5rFxsX+4f+hL+QjXi1xHWf4\nVNfFYLN28UeZDhHcHbShwxdLCXDDpAkFYUWRrrrHrKeOpdifqYSsHHqX7vfD\ngNDBvty3F8PNnm7AA014PMJp02VCQEFW0TLOnpchdgeySXDZRg/0GLS1CJCP\n3pqJBuKW1woNYO/dAk5LbL5inBwjM1xwCFkymt2loYSjIOJYEgYhmjsCYN4j\n+S8wMgVtyHDXW6W38F1XENt9v+9XS7wYo7dltHaPdGl3ZA5u43WgwLXvESwB\nLUsA\r\n=apee\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","readme":"# Nexmo Client Library for Node.js\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer,\n  // Set a custom API host for requests to Conversations API and Messages API. Defaults to api.nexmo.com.\n  host: string\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#retrieveConversation\n\n### Get paginated Conversations\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\n### Get next page of Conversations\n\n```js\nnexmo.conversations.next(response, callback);\n```\n\n### Get next previous of Conversations\n\n```js\nnexmo.conversations.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#listConversations\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#replaceConversation)\n\n### Record a Conversation\n\n```js\nnexmo.conversations.record(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#recordConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteConversation\n\n### Create a Member in a Conversation\n\n```js\nnexmo.conversations.members.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createMember)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMember\n\n### Get paginated Members\n\n```js\nnexmo.conversations.members.get(conversationId, options, callback);\n```\n\n### Get next page of Members\n\n```js\nnexmo.conversations.members.next(response, callback);\n```\n\n### Get next previous of Members\n\n```js\nnexmo.conversations.members.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMembers\n\n### Update a Member\n\n```js\nnexmo.conversations.members.update(conversationId, memberId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#updateMember)\n\n### Delete a Member\n\n```js\nnexmo.conversations.members.delete(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteMember\n\n### Create a Event in a Conversation\n\n```js\nnexmo.conversations.events.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createEvent)\n\n### Get a single Event\n\n```js\nnexmo.conversations.events.get(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvent\n\n### Get paginated Events\n\n```js\nnexmo.conversations.events.get(conversationId, params, callback);\n```\n\n### Get next page of Events\n\n```js\nnexmo.conversations.events.next(response, callback);\n```\n\n### Get next previous of Events\n\n```js\nnexmo.conversations.events.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvents\n\n### Delete a Event\n\n```js\nnexmo.conversations.events.delete(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteEvent\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUser\n\n### Get paginated Users\n\n```js\nnexmo.users.get(options, callback);\n```\n\n### Get next page of Users\n\n```js\nnexmo.users.next(response, callback);\n```\n\n### Get previous page of Users\n\n```js\nnexmo.users.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUsers\n\n### Get paginated Conversations for a User\n\n```js\nnexmo.users.getConversations(userId, options, callback);\n```\n\n### Get next page of Conversations for a User\n\n```js\nnexmo.users.next(response, callback);\n```\n\n### Get previous page of Conversations for a User\n\n```js\nnexmo.users.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Record a Conversation\n  * [x] Create a Member in a Conversation\n  * [x] Get Members\n  * [x] Update Members\n  * [x] Delete Members\n  * [x] Create an Event in a Conversation\n  * [x] Get Events\n  * [x] Delete Events\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"8d959579680a10c605feb3b42393df745eddbd18","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"mheap","email":"m@michaelheap.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.10.0","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.7.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.7.7","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.6.0-beta-1_1572021617349_0.3470762977965196","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.2":{"name":"nexmo","version":"2.5.2","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.2","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"d5ff9b64a4b3e9b54d76e52499a788f36c371398","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.2.tgz","fileCount":45,"integrity":"sha512-nxlTAh/XgRWnRhfPN+AQeM6vSOU+RLJIMass38heY0ertcrkTLW1Wo73ASx4ycqsWIE6J3EP4SO0OZRtNFgaxA==","signatures":[{"sig":"MEUCIBBYolIeRjCpdvIiLL70E0pFgkFPQTK0+kYZZNk4fxM4AiEA5/rVLwrTH5AZFDOBPYHA/Z0mm3NWhHS8XyHKSTfLfwQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":408107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5LxMCRA9TVsSAnZWagAA+L4P/0ZkVrbPIenIwP9xp/2F\n2chnneKt6ORh4QUSA9v0hsJsmKHW6YhZk8YzCJd1aNzlH4FF0ns3JF3vJOxK\ndwh6LbgocK9rGKoQLTc7K3vtfByVD4TuCzjLkO9T6hh4poxZEq4y1TBJsR+H\nxrB8fTAtLTIqLlxHE3ec8Co9lbdCOJCZr64sbPCW/V8IR6fELloH/jy6FeSo\nu2raBGib+NnoYN4ruVRwG2Dzngn7CUVkpztgrAkVSs3fr3B5ie3GWExaqQuO\nASY+RS/EUdMespw2rlYcCduI+pdwM5M0MjDcBWT67Szq81Ah6LW/GBTDpTvu\nG+BTx4sWSIp1l4GfweALfw7ZQIzc0uATclZ6P1aXYHVOtToZ6DHaS3z+ix6p\nVK/GSJlJOJOKhKt+wiWKk9X78jvMrqV7oGcTgpUQQLIFq90kW4pkWoXS1Q8r\nwABLohV57Ok7JJ1n0IXTzLAtTryxwDgNgg7rTL8n0H1cSYc+5VfmtpOODahO\npu/h8YhLc2rLhPOmhljEDuP04UezPGBUTbwbkvrhIUxTrpZIYT87OEHDDVEx\n3Pti3VK530WV59TUeb8Y29QsinGMWtIJNqLuMfrF9RD+T48nM01GbcWRcXPe\n+xJWgvqrxhBdhkPcFTxNcnq8xVC/qs5gJkfsyeogU3DDF/e4pCrlxRYxWQWq\nvYVh\r\n=82FE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"ce5c5536d49e72f2fdb95301826347f62740e358","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.10.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.2_1575271499847_0.8357159455626999","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.5.3":{"name":"nexmo","version":"2.5.3","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.5.3","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"578af3af6d27db0435a18e5bfd52df6f9838609e","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.5.3.tgz","fileCount":45,"integrity":"sha512-rzky6EjYMCmqx4o1+c2XyqN3ZKFCBwr8EupecdV+ScUIrUptyu0ByXSG4OmWNWtpsNPQyThGnOaePEUJHYdXhw==","signatures":[{"sig":"MEUCIEwQNpans4+dYA9bWqppNyoRSogj6EtjkoUjO1sMZWsOAiEA704KMOLJyyTal/EOLDmNOWKKvTN1RoHFCcaWkGnIXpE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":425045,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHCoXCRA9TVsSAnZWagAAwJoQAIAh19FkBa6BfGFgIYdo\nbkyuvdqrAulokR373cZOHKd3xlnGtmqyQ5/Lvu9nRodtkJAXv50xwFQy3vzs\nHytcdoYpYATKGKLT7ppYniAJeWVLCtx9Qwx36+RQVpeGblMo42c9b5R205pg\niVkA12IxJglaGDskKLJLihiKybkXhAczg0f6Gjv7Sy2LdElZZozdtR6oDs5y\nPBpWdNNb3pUs+1bQ9gZr2PCT2ymjhS9U/xxg+7wPvhuO8a7D6G66K8Z4psEW\nWqbDRq0HRIH04MlaOb5LncCQke3UQjs8oFnjw2ZrDqdPQtF/z4hTlh3+RkNy\n+lq8nTjwiee+WRpa1+51mz5QUQyOvXOEW2CbjRUef46i0eNB0jhlS6xhQECb\nYnaAnLEPi1x1BnxjYoINDc1O7W0l421GuwYkOwS0383DUkzKLVq7dMlWehkG\nB4CiGVKkXYbK2af8BKnIkPdcZZCx0kPKJ2dGC7Rnqfe/52H+lRkzxO7nXNbI\nNQne9vtVoz1SVBYnAy/0MULGRD8ayPERF7vCwrc4gDLzx+R9LajduRsBdWDX\nDGPbikxWta/tcKgOLWZn6dem2Dki4E+PCZgTXp3nZK9mtEWrIILDaX6QknWf\n7a5PZzesfQmjVSaZaa7HwqtTMWjjSYJG3OW7ARZjopWx/Rfr6R+ZFGFFmh/R\nmaCe\r\n=rfbk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"51773f5a104181593e488aeee74361236b031a61","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.10.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.5.3_1578904086429_0.032334128844484056","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.6.0":{"name":"nexmo","version":"2.6.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.6.0","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"83149655e11a92623671b8e38a10926aa270d9c5","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.6.0.tgz","fileCount":45,"integrity":"sha512-d5+9oDWw0Kihg8qQ7/jvwfHuNSXSHWA0dXFBSZRM+2ml0lFviXSJzg3hRLLMEyjgAeMIQZxjcIMiRdTPx1ULeQ==","signatures":[{"sig":"MEUCIQCVYmZHORpob6XDivRn5V36lPKwgMsnWf3A9QbSpPd8IAIgIKiiX7Cl37SumRhRjOwJklZQ4T4sf17BRas2DWgVUcs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":427975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeJcV6CRA9TVsSAnZWagAApyUP/0mgFhe7EJSjO9WuKE1r\n9pyu428s1ESNv1AhtZCMi9SbTU3Zk2ce5abgJi6iGCT2dmQFo42aFSqA/Hj1\nW2fltXFWwWClY04/MSgiI2Ub4nTnsWMWrFb288ETRttB3FWRj/yvaA1/Pt8o\nSGq3dGvwIszqryKSsmzWo6ZPzY07cHBAGpvz50zixObn81KYaWl2W0oqHydv\nB5X3F874vrfYDufn0U8fedOdMzhFKwbyRIG5RzU3IJZzvp/b/X+qHR5ZGaM8\nqEvYcSZu0TpiT+Px5c/6BTEFwHnHMrXhgSThyPmgoSH6kT74R0aSY6cMmmRx\n9ivLpRjxCD9p16ymBH9SLaq2k08aGiyFMA0Amt2NhMGQQnVwFjbdPcABlpXa\nfUl4R7RSSLPKwixL1L2bQBUa0yOngepGY5QdIHnGWrjF94KpSk6we0CuzEWo\n4s6POTtbGITPhyXRUoWSUpAbCtMcTgwdcBSdaFTPCwX2Dj/ebFLnA9RI5c9t\n84ZqKmaws4Xb6Su/G2mExHY3tFefoeWc0k1EtuYxjTxr275WAboW6m3esya7\ndQFS/IFEgyG4JrwQqo86jNDBZGmTBMWrmHe0W+hL3ZXCJk/lexoRVQEvkEoN\nfKOkH+EGZU3q4/IUmPjug35ezJwpanPXmLob8rFuLIxq7y03h5elP9OOiKGj\nA31t\r\n=uby0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"bd19e4b491d2a050dae909da8e3788232c075532","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.10.3","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.10.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.6.0_1579533689964_0.4497547596848308","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.7.0-beta-1":{"name":"nexmo","version":"2.7.0-beta-1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.7.0-beta-1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"},{"name":"alexlakatos"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"516ca0f782954d97117f61a29422a8fa70ea9a20","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.7.0-beta-1.tgz","fileCount":46,"integrity":"sha512-HMqrJH9tTASiGVmnXrLoCUPcPpkt982n9jr/V2b4qnsaKDP9E4JUkBPBqK0jM3NeGQ6FqLotTjYDlypAFw/35g==","signatures":[{"sig":"MEYCIQDFPMJhsYODyLHwqwpAyK2aiarmq+MmtyPlOon8lM+dXwIhALAe2B0JZLLZ6/UTuxs3XkgUyARnZa0lXAN+wEfl27bH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":450308,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJefMRHCRA9TVsSAnZWagAA1rAQAJ1i03YpGBUq1N4KdTES\npJ9DIrCxgR4V7B1z+y/QTqETCldX9GNhNU+hzeVd7kolaxX6J1Z7ta9+3jAk\nwtP36JuUmEPdSk9Z0H0W3pxvetCckAcryf8JxsLtECT5byjdip9aYjDPIYwk\nvppG2JDDOdV/mlq+5nMlhoQL4C4gzV0Rp7ngQGax8L5ej7qTehkq3jloxpcL\nGlaMzpJM48I2troDk+b4GN5+gMB4+Uc9qaMC15/a6s2LJo2fVq2M7dU7n3pz\nDJIn9n3fRyXNsCF02EWQ1B9QvFMr4PqrK0pmbmrBuBWs/VtAdLziKQ58DVHG\nAEa/QvJi7N9hD8FTw+5XsX00VWRHyrq3we9fsIKHbd3KIKmJB8BwLActvI0N\nrVKRfokGtl+ycl8SdPOWcKUQI5BRUDT7Bp5M7LIZ8tpycX6roFIoC1kGpv/0\nRV+oK47mxFM9kZh/mLpvm54XlYZ57hAlWjOJ0Ev2ycDTpjSD3I5iQa0miv3y\n4dh56wYL27ao3kcCJ8yFxxYMXS7kKOwjY4HZhJs3vE16prqpsYEaZvPU0Vb9\nCKpDFeqQTE5JHJkGPzv/kouqEpHQ2+53RVIKD41AbYbpCzxFm9Yw5i8LMXFg\nrsy7fUygN/zHbf5dbD2ySA4jKrqj9KJSXJdPV74jMJFJNzovfevMt8K/ehIV\nzafv\r\n=gxCn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","readme":"# Nexmo Client Library for Node.js\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\n<img src=\"https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg\" height=\"48px\" alt=\"Nexmo is now known as Vonage\" />\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Conversations](#conversations) | [Users](#users) | [Management](#management) | [Redact](#redact) | [Pricing](#pricing) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n* `apiKey` and `apiSecret` are required for SMS, Verify, Number Insights, Account management APIs\n* `applicationId` and `privateKey` are required for Voice / Stitch applications\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo.\n* `apiSecret` - API SECRET from Nexmo.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer,\n  // Set a custom host for requests instead of api.nexmo.com\n  apiHost: string,\n  // Set a custom host for requests instead of rest.nexmo.com\n  restHost: string\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Conversations\n\nFor an overview of conversations see https://developer.nexmo.com/stitch/overview\n\n### Create a Conversation\n\n```js\nnexmo.conversations.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createConversation)\n\n### Get a single Conversation\n\n```js\nnexmo.conversations.get(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#retrieveConversation\n\n### Get paginated Conversations\n\n```js\nnexmo.conversations.get(options, callback);\n```\n\n### Get next page of Conversations\n\n```js\nnexmo.conversations.next(response, callback);\n```\n\n### Get previous page of Conversations\n\n```js\nnexmo.conversations.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#listConversations\n\n### Update a Conversation\n\n```js\nnexmo.conversations.update(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#replaceConversation)\n\n### Record a Conversation\n\n```js\nnexmo.conversations.record(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#recordConversation)\n\n### Delete a Conversation\n\n```js\nnexmo.conversations.delete(conversationId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteConversation\n\n### Create a Member in a Conversation\n\n```js\nnexmo.conversations.members.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createMember)\n\n### Get a single Member\n\n```js\nnexmo.conversations.members.get(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMember\n\n### Get paginated Members\n\n```js\nnexmo.conversations.members.get(conversationId, options, callback);\n```\n\n### Get next page of Members\n\n```js\nnexmo.conversations.members.next(response, callback);\n```\n\n### Get previous page of Members\n\n```js\nnexmo.conversations.members.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getMembers\n\n### Update a Member\n\n```js\nnexmo.conversations.members.update(conversationId, memberId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#updateMember)\n\n### Delete a Member\n\n```js\nnexmo.conversations.members.delete(conversationId, memberId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteMember\n\n### Create a Event in a Conversation\n\n```js\nnexmo.conversations.events.create(conversationId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createEvent)\n\n### Get a single Event\n\n```js\nnexmo.conversations.events.get(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvent\n\n### Get paginated Events\n\n```js\nnexmo.conversations.events.get(conversationId, params, callback);\n```\n\n### Get next page of Events\n\n```js\nnexmo.conversations.events.next(response, callback);\n```\n\n### Get previous page of Events\n\n```js\nnexmo.conversations.events.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getEvents\n\n### Delete a Event\n\n```js\nnexmo.conversations.events.delete(conversationId, eventId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteEvent\n\n## Users\n\n### Create a User\n\n```js\nnexmo.users.create(params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://developer.nexmo.com/api/conversation#createUse)\n\n### Get a single User\n\n```js\nnexmo.users.get(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUser\n\n### Get paginated Users\n\n```js\nnexmo.users.get(options, callback);\n```\n\n### Get next page of Users\n\n```js\nnexmo.users.next(response, callback);\n```\n\n### Get previous page of Users\n\n```js\nnexmo.users.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getUsers\n\n### Get paginated Conversations for a User\n\n```js\nnexmo.users.getConversations(userId, options, callback);\n```\n\n### Get next page of Conversations for a User\n\n```js\nnexmo.users.next(response, callback);\n```\n\n### Get previous page of Conversations for a User\n\n```js\nnexmo.users.prev(response, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#getuserConversations\n\n### Update a User\n\n```js\nnexmo.users.update(userId, params, callback);\n```\n\nparams is a dictionary of parameters per [documentation](https://ea.developer.nexmo.com/api/conversation#create-a-conversation)\n\n### Delete a User\n\n```js\nnexmo.users.delete(userId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/conversation#deleteUser\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n  * `has_application`\n  * `application_id`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Pricing\n\n`type` is the type of service you wish to retrieve pricing for: either `sms`, `sms-transit` or `voice`.\n\n### Get pricing for a specific country\n\n```js\nnexmo.pricing.get(type, country_code, callback);\n```\n\n### Get pricing for all countries\n\n```js\nnexmo.pricing.getFull(type, callback);\n```\n\n### Get pricing for a specific dialing prefix\n\n```js\nnexmo.pricing.getPrefix(type, country_prefix, callback);\n```\n\n### Get pricing for a specific phone number\n\n```js\nnexmo.pricing.getPhone(type, phone, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## Channel\n\n### Send a message\n\n```js\nnexmo.channel.send(\n  { type: \"<TYPE>\", number: \"<TO>\"},\n  { type: \"<TYPE>\", number: \"<FROM>\"},\n  { content: { type: \"text\", text: \"testing\" } },\n  callback\n);\n```\n\n## Dispatch\n\n### Create a dispatch\n\n```js\nnexmo.dispatch.create(\n  \"failover\",\n  [\n    {\n      to: { type: \"viber_service_msg\", id: \"<TO>\"},\n      from: { type: \"viber_service_msg\", id: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        },\n        viber_service_msg: {\n          ttl: 30\n        }\n      },\n      failover: {\n        expiry_time: 600,\n        condition_status: \"delivered\"\n      }\n    },\n    {\n      to: { type: \"sms\", number: \"<TO>\" },\n      from: { type: \"sms\", number: \"<FROM>\" },\n      message: {\n        content: {\n          type: \"text\",\n          text: \"<CONTENT>\"\n        }\n      }\n    }\n  ],\n  callback\n);\n```\n\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [ ] US Short Codes\n    * [ ] Two-Factor Authentication\n    * [ ] Event-Based Alerts\n      * [ ] Sending Alerts\n      * [ ] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Conversations\n  * [x] Create a Conversation\n  * [x] Get Conversations\n  * [x] Update a Conversation\n  * [x] Delete a Conversation\n  * [x] Record a Conversation\n  * [x] Create a Member in a Conversation\n  * [x] Get Members\n  * [x] Update Members\n  * [x] Delete Members\n  * [x] Create an Event in a Conversation\n  * [x] Get Events\n  * [x] Delete Events\n* Users\n  * [x] Create a User\n  * [x] Get Users\n  * [x] Get Conversations for a User\n  * [x] Update a User\n  * [x] Delete a User\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Channel\n  * [x] Send\n* Workflow\n  * [x] Create\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","gitHead":"f8d00a4a4a0a61270c2cce6ff9005c6360d812e2","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","test-e2e":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./e2e/*.spec.js","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --compilers ./node_modules/.bin/_mocha --compilers js:babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.13.4","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.15.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^5.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.7.0-beta-1_1585235015120_0.40360691455708286","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.7.0":{"name":"nexmo","version":"2.7.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.7.0","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"d673226a17025d5696ca735371d859a8ae10cb96","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.7.0.tgz","fileCount":47,"integrity":"sha512-VPKqk4dNwt8lwSwHy0UrCadmWceSuRWVgGor+8FvBC1NAfossc8gfVKLH3TVno4Pj2TaL4oq1t0E1HjchhvxFQ==","signatures":[{"sig":"MEUCIH51AAwMFmKF4ujMZ/Px7I4kEbF3BOx+Ka1qE+E1rtD3AiEA4yev2DznWUoZQe5Hq8TegVMJUPqxNOrrgc7JxgNY91c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":501216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe4RPcCRA9TVsSAnZWagAALdEP/RmTXuuXflOCx+C0YFFN\nBSESjy8So2/LHeRslp8+yGfXxkTr2q5Lnqt5D7TAPvNwR/UP2++TLCvBpQkz\ngI6pTvdFpEeZpZkrDBZLUTZcWQO76gjotWlDuy5Xe8s82M5Y6nmPfEiKhhIh\nw9LzcyjR8Qifys57GhYzZVZwEDoOniSUZId2Wf45d6zIUF1STf9KucWnNPEy\nVyFXsl+p6lG1UkxolvbUaIpSxhO/xv3YKUeOYxEPU5pVQDL+pjeE75dsaQqL\n6c7nJbVATDogUZ/d6xL85Rzi20rbQ0kHCOw/2xwrzhpAU/9mOI4RiC3OI61j\ndfIlZQmAHaOqqN/tdoCHs85048woHgQnRiroBtQdTugEgj/n4q8qUnruIdQ6\nz1BNA9JS/7SQFCrzb9kqT5XELi/ZmfUpumZpiIcMUryIVUmHSTaxK7GfLbzq\n1suiWxWuBXfOWe3A4t3n0wiMyueKGgr2pP9ll8ybI2Rh6RDSj375Rb7kfOzJ\nVN5Dgl4U2yUBjGy6D19+CNPDQdb0yRf+DvlrO1is1q71fuv5yyjtK/1NIc1+\nWFm2onc7gGhfkcOT5gEXmpF0a2HC1XJzaL8+w/e6iXhNSVMtOaBDCp8XOABp\nN6igNiwQ6Npfl2XkjgW9zeCBX6EYSsdKCmD3sXBgEiyt83uSxn9qvYNabVRX\ngIIM\r\n=D4j7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"39a7f925215f59db7786785fab3b25a56a0732da","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --require ./node_modules/.bin/_mocha --require babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"nexmo-devrel","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.14.4","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.17.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^7.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.7.0_1591808987392_0.33445351120181277","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.8.0":{"name":"nexmo","version":"2.8.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.8.0","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"ee77c8aa9f03f69588b9c94979e03afda37c0db1","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.8.0.tgz","fileCount":47,"integrity":"sha512-IcnnAYskfbmIz+hvTcpaOdxjozQiGFsZkbzuy6XbD3/em8hmF8pi8ppS5qofxRiGnQHxwZ+WAmTPxRpTktnfZA==","signatures":[{"sig":"MEUCIF9KHcK3F/pqt5HpYNLLrO8TAjGNrePcYSeDW5jPHj8GAiEA4txL8gTkr1XFYgkPfnLVTxSUJ4YPnt8DFWgcpsxDmrw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":503129,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9cAzCRA9TVsSAnZWagAAtv4P/iFZ7GmqZQr39fYbBjWl\n9bY3C8KQ7D2KXFI/VX/MxkwN/j1uUk9FDDl+pUy2h5RYGsRa/WI47LdbRYFd\n5q9O/6jkB+RjBS2mgSfCSL9VDfbdfPV9qfJU9oSMirnjcJ1T++SWj4bvQ4wu\n8ztK1ayrMmzwwKU2tLCCUSuwFR4m1C2Gy+QE9gEj1GGICm6kuBeuow5tulPi\nMQmRgYee8F1TZgSoMYTW+vgk7xZj0QarMy3RNvAmDghVtmk+xozsZfWDzzEY\nor5k1gapiCSusCqmRTDKQHaWPT3c0jpBMDdHxaCBzoQtbSjQcs6/8VVr1Zcw\ntp1WRxp+VpxkA1BXMQD2DiQY/+rDO/ETNh+2F0kA42KczL9d3eoGbNa1nGYx\nIQ4sTgSWRVbSZs4BENHg+HAX94q/YEONO94tCFWtoU4uwgemzC5SQPK/wOgt\n5mz8gbn+t3mh67xI+v/H7ragLHeAz598Xo/RLA92lquyt7F5Qcxq7Ccmv7w9\nHO12Csdp0Y3V09936KNeTHQkv916TRkE+vizLgvJtm7SpPPi3FWtaAfdJ2TQ\nEcB8hCxVDyFiIRlDrvCCIufeWsS6KasiwlUt2khIlraUTpsNaI8ab7z3AIAU\ny4hcE1T/dHFLGknYREDRtjk8s+g9iPJAGGEkc5c2rVm9Qx/5zjMkdfcndPnk\nuuKd\r\n=7Tkj\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"8bcb6e01efa17cb6896ced6bacbbb2058938ef73","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --require ./node_modules/.bin/_mocha --require babel-register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"lornajane","email":"lorna@lornajane.net"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.14.5","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"10.21.0","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^7.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^1.18.9","bluebird":"^3.5.3","prettier":"^1.16.3","babel-cli":"^6.26.0","cross-env":"^5.2.0","expect.js":"^0.3.1","sinon-chai":"^2.8.0","body-parser":"^1.18.3","sinon-expect":"^0.3.0","babel-register":"^6.7.2","babel-preset-es2015":"^6.9.0","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-object-rest-spread":"^6.26.0"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.8.0_1593163827459_0.5576866055737169","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.9.0":{"name":"nexmo","version":"2.9.0","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.9.0","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"fa16798e1cdf0c524a47f048e61fe4be9a668d2a","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.9.0.tgz","fileCount":47,"integrity":"sha512-z5hMmtW3Q77kdHO7gzBJ8DoTmKMdwVu3aqQUkoHjGuDaIKnhOWNzam+hZkXRLriPTvZvsT/nq7dMgt5sGxT9Iw==","signatures":[{"sig":"MEUCIQDJFk/aHle4jfAzNpMyml4fqTDry1wr0aLLDDVVy0C4RwIgfv0kOElnLIbkPj2NPCoazVWU9ZaqnFilDJg3vm4pEAM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":493201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOp+1CRA9TVsSAnZWagAAsncP/jn9dFWyEK/zLE+R4sQe\nvJO1t3brBuBv+UPFvmpdbXlNigtw9ao1E1CVOTMqEizpN3a6xZUupfXanNdi\nQDiU6Sk5AGWv/fDgoiBFB0+FameWAo/cPLdfylweSLVmN1JHCgV3gua8kT3Q\nnagq4EZ4UvjUI7ey9IbaH3w9iJmI7DpfB3+JHg82u7em69fW/EQKrSvcPUQy\nVPW2+0DUIlMs3t4YE/yJz8gQOrjFgYpB55tiuvDMpEGGXutrJh91mM4I1XuD\n0Vrw0LIi/LlnqHxL77qP/KNjEkp4NNVRsKne+o4aGHbgf/TiW0Qw2XpqNFwQ\nN3pIbXyD9n+fimhvmBMzusGGrBhsZQWpA3IbQA6iNq5S8RkplDMmIgVp8rtH\nOuqkh5v7ZR6ICb00H+eK2KNnDE+ye/bgXMo8KsnpQY8zE1fd9xEUSmA+4uPL\nAwP7LO2YM8VXth/x3inuK89ZLLjq9YjeOScddciR3EG8lgh1U//B5Drs7X0r\nwNbQSdJ0634fJzFd3tuga7ug/PjnJLReyFPe6q3C1Hl6EJRFE57Bg5YACiPT\npVAEFawGp72arb12DqC99DF+7uCqp7j0LzE+kiHdpy+BL3JOOdUddGJq+pwx\nVIg3/qJb2LPvM4RzvP4SFSaNiQqLwADwvYhUXBS4skhVcCagoSVodT/x89EI\nI7+2\r\n=ARV4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"3b8312ed0360c631351b73690a0c922ea01c1df2","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --require ./node_modules/.bin/_mocha --require @babel/register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"nexmo-devrel","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.14.7","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.16.3","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^7.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^2.0.4","bluebird":"^3.5.3","prettier":"^1.16.3","cross-env":"^5.2.0","expect.js":"^0.3.1","@babel/cli":"^7.10.5","sinon-chai":"^2.8.0","@babel/core":"^7.10.5","body-parser":"^1.18.3","sinon-expect":"^0.3.0","@babel/register":"^7.10.5","@babel/preset-env":"^7.10.4","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","@babel/plugin-proposal-object-rest-spread":"^7.10.4"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.9.0_1597677492710_0.09092078485705235","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.9.1":{"name":"nexmo","version":"2.9.1","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"author":{"name":"nexmo"},"license":"MIT","_id":"nexmo@2.9.1","maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"homepage":"https://github.com/nexmo/nexmo-node","bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"dist":{"shasum":"35af37a22e21c3c9bbbc0733903eaf3b6753967e","tarball":"https://registry.npmjs.org/nexmo/-/nexmo-2.9.1.tgz","fileCount":47,"integrity":"sha512-FxmJ2Ou5qi4BH6hSo24OiFwPVYPl08uyXv13KybmkAbjh9W+kpaPK2wwsg1Dz39rrgIyAhWAq+4cqMvmk1UjrQ==","signatures":[{"sig":"MEUCIQCA4FQCU0AYRQ3+ijRNgfXFInbTyTXwLmwYV28ovyFT/AIgINeoBdWlZJSdOhJ0oxGNACSn9tW7s+WlyM27ZWsHgA0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":494124,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfOvrICRA9TVsSAnZWagAA8E4P/1oN5bDUg8deSyeL1PUR\nItily1EkANHJZBWVBKuO3JHTtbvKT6MrDOl2viSJOb63gu0SzvUjQ8VKrAGy\nOEEGiy3uoKyo6f/0DdHLla65BWXoQIn59w3aAGbSxa+f3ifNhwfXI3dRqdd0\nPSJgHDzZ6XUMOSIIga6/CnSAAYQzNu0SvXshgn6Y0l7KMm8qN47723Zhk2Ht\n4c9Kny47HbTtAPO4VRhks71Fm2UXPHvHYXOKp2O9gPGmQi37xcll7VDS8I7y\nydW1PIjxLP3b7whN9UzBHcg2oOLRwQfi1UK67ek9wUMnHHlGYEw9ERbR9MJF\nKkiZqt0Cmsraudvsd7AUb4MxQNzCoiw+OYNaTSuKOwyveO9xGvtA9iVNxbyN\nui/BhrzX/sPg9HF5vy6kSvHWywjuzQyWLPzTI7o1SWJbF/B4VKSIKzeB9byr\ntfjYjsHvAJwEy6GNclUQRngx/WAHc8/yaD8SYqYMrAbS7nNWH/DXDcn0PXHb\nFbkvGtVWoJ96sS6rUyQPQEaTMo8Nzm1ZzSmrYJd55rYDy3yzycylizBiF5Y9\nHL41C6ynOqXraXADWi1SkVZ3Y3yvyKE8ldd5b6I/qVPcz2IWzO4caNuIRNWm\n0LS8/B55mODZ3Vy5vHoEua4c1ePCKUpvrqyYpG8tjdBNLdUQefO3YV0nZCdW\nIYvN\r\n=OyO7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/Nexmo","types":"./typings/index.d.ts","gitHead":"9392c49ada970af18370b3600fd71e42f298cdce","scripts":{"lint":"eslint src test","test":"npm run test-no-lint","compile":"babel -d lib src/ -s inline","pretest":"npm run lint","lint-fix":"eslint --fix src test","prepublish":"npm run compile","test-watch":"nodemon --watch src --watch test -x 'npm run test-no-lint'","test-no-lint":"npm run compile && mocha --require ./node_modules/.bin/_mocha --require @babel/register ./test/*-test.js","test-coverage":"cross-env NODE_ENV=test nyc mocha","report-coverage":"cross-env NODE_ENV=test nyc --reporter=text-lcov mocha > coverage.lcov","test-coverage-html":"cross-env NODE_ENV=test nyc --reporter html mocha"},"_npmUser":{"name":"nexmo-devrel","email":"devrel@nexmo.com"},"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"_npmVersion":"6.14.7","description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","directories":{},"_nodeVersion":"12.16.3","dependencies":{"uuid":"^2.0.2","request":"^2.88.0","jsonwebtoken":"^8.4.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^3.5.0","mocha":"^7.2.0","ngrok":"^2.2.2","sinon":"^1.17.4","dotenv":"^2.0.0","eslint":"^4.18","express":"^4.16.4","nodemon":"^2.0.4","bluebird":"^3.5.3","prettier":"^1.16.3","cross-env":"^5.2.0","expect.js":"^0.3.1","@babel/cli":"^7.10.5","sinon-chai":"^2.8.0","@babel/core":"^7.10.5","body-parser":"^1.18.3","sinon-expect":"^0.3.0","@babel/register":"^7.10.5","@babel/preset-env":"^7.10.4","babel-plugin-istanbul":"^4.1.6","eslint-config-prettier":"^6.2","eslint-plugin-prettier":"^2.7","babel-plugin-add-module-exports":"^1.0.2","@babel/plugin-proposal-object-rest-spread":"^7.10.4"},"_npmOperationalInternal":{"tmp":"tmp/nexmo_2.9.1_1597700808138_0.35526129843907306","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2011-11-19T20:22:25.973Z","modified":"2025-01-22T14:56:13.642Z","0.0.1":"2011-11-19T20:22:26.578Z","0.0.2":"2011-11-19T21:28:22.384Z","0.0.3":"2011-11-19T22:11:15.741Z","0.0.4":"2011-11-19T22:49:42.177Z","0.0.5":"2011-11-20T19:49:40.185Z","0.0.7":"2011-11-21T04:29:20.494Z","1.0.0-beta-1":"2016-05-15T16:06:00.643Z","1.0.0-beta-2":"2016-05-15T17:54:27.545Z","1.0.0-beta-3":"2016-05-15T19:50:18.996Z","1.0.0-beta-4":"2016-05-15T19:53:58.467Z","1.0.0-beta-5":"2016-06-23T13:07:35.551Z","1.0.0-beta-6":"2016-07-06T21:04:47.127Z","1.0.0-beta-7":"2016-07-07T21:46:40.208Z","1.0.0":"2016-09-13T10:26:08.105Z","1.1.0-beta1":"2016-10-08T13:01:00.042Z","1.1.0":"2016-11-14T13:23:08.852Z","1.2.0-alpha":"2016-12-06T17:26:39.806Z","1.1.1":"2017-01-23T18:22:22.556Z","1.1.2":"2017-01-30T14:12:58.753Z","1.2.0":"2017-01-31T14:54:00.167Z","1.2.1":"2017-02-23T00:10:47.027Z","2.0.0":"2017-03-20T23:52:08.051Z","2.0.1":"2017-03-21T13:51:53.452Z","2.0.2":"2017-03-22T16:55:47.886Z","2.1.0-beta-1":"2017-10-18T15:53:38.680Z","2.1.0":"2017-12-14T15:06:05.346Z","2.1.1":"2017-12-14T15:29:12.255Z","2.2.0":"2018-01-24T14:05:29.654Z","2.3.0-beta-1":"2018-03-14T01:20:47.826Z","2.2.1":"2018-04-29T11:02:45.672Z","2.3.0":"2018-06-01T14:49:21.026Z","2.3.1":"2018-06-18T21:39:11.820Z","2.3.1-beta-1":"2018-06-18T22:17:34.886Z","2.3.2":"2018-06-18T22:32:59.982Z","2.4.0":"2018-09-27T16:17:49.804Z","2.4.1-beta-1":"2018-10-09T15:38:57.538Z","2.4.2-beta-1":"2018-11-19T15:25:00.575Z","2.4.3-beta-1":"2018-12-21T20:24:58.229Z","2.4.1":"2019-01-31T18:56:10.397Z","2.5.1-beta-1":"2019-06-25T13:24:57.338Z","2.4.2":"2019-09-05T09:30:34.558Z","2.5.2-beta-1":"2019-09-12T08:31:53.488Z","2.5.3-beta-1":"2019-09-13T05:24:04.071Z","2.5.3-beta-2":"2019-09-13T05:27:39.992Z","2.5.3-beta-3":"2019-09-13T05:39:56.499Z","2.5.4-beta-1":"2019-09-26T11:48:19.119Z","2.5.1":"2019-10-04T08:38:21.953Z","2.6.0-beta-1":"2019-10-25T16:40:17.508Z","2.5.2":"2019-12-02T07:24:59.965Z","2.5.3":"2020-01-13T08:28:06.545Z","2.6.0":"2020-01-20T15:21:30.107Z","2.7.0-beta-1":"2020-03-26T15:03:35.286Z","2.7.0":"2020-06-10T17:09:48.040Z","2.8.0":"2020-06-26T09:30:27.605Z","2.9.0":"2020-08-17T15:18:12.868Z","2.9.1":"2020-08-17T21:46:48.285Z"},"bugs":{"url":"https://github.com/nexmo/nexmo-node/issues"},"author":{"name":"nexmo"},"license":"MIT","homepage":"https://github.com/nexmo/nexmo-node","keywords":["sms","voice","nexmo","verify","2fa","phone numbers"],"repository":{"url":"git://github.com/nexmo/nexmo-node.git","type":"git"},"description":"Nexmo REST API client for Node.js. API support for SMS, Voice Calls, Text-to-Speech, Numbers, Verify (2FA) and more.","contributors":[{"name":"nexmo"},{"name":"pvela"},{"name":"leggetter"},{"name":"akuzi"},{"name":"bpilot"},{"name":"justinfreitag"},{"name":"ecwyne"},{"name":"https://github.com/backhand"}],"maintainers":[{"name":"alexlakatos","email":"alex.lakatos.qa@gmail.com"},{"name":"cbetta","email":"cristiano@betta.io"},{"name":"leggetter","email":"phil@leggetter.co.uk"},{"name":"mheap","email":"m@michaelheap.com"},{"name":"nexmo-devrel","email":"devrel@nexmo.com"}],"readme":"# Nexmo Client Library for Node.js\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md)\n[![build status](https://secure.travis-ci.org/Nexmo/nexmo-node.png)](http://travis-ci.org/Nexmo/nexmo-node)\n[![Known Vulnerabilities](https://snyk.io/test/github/Nexmo/nexmo-node/badge.svg)](https://snyk.io/test/github/Nexmo/nexmo-node)\n[![codecov](https://codecov.io/gh/Nexmo/nexmo-node/branch/master/graph/badge.svg)](https://codecov.io/gh/Nexmo/nexmo-node)\n\n<img src=\"https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg\" height=\"48px\" alt=\"Nexmo is now known as Vonage\" />\n\nA Node.JS REST API Wrapper library for [Nexmo](https://www.nexmo.com/).\n\nFor full API documentation refer to [developer.nexmo.com](https://developer.nexmo.com/).\n\n[![NPM](https://nodei.co/npm/nexmo.png)](https://nodei.co/npm/nexmo/)\n\n[Installation](#installation) | [Constructor](#constructor) | [Callbacks](#callbacks) | [Messaging](#messaging) | [Message Signing](#signature) | [Voice](#voice) | [Verify](#verify) | [Number Insight](#number-insight) | [Applications](#applications) | [Management](#management) | [Redact](#redact) | [Pricing](#pricing) | [JWT (JSON Web Token)](#jwt)\n\n## Installation\n\n```bash\nnpm install nexmo\n```\n\n## Constructor\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD\n  }, options);\n```\n\n* `apiKey` - API Key from Nexmo. If `applicationId` and `privateKey` are present, `apiKey` is optional.\n* `apiSecret` - API SECRET from Nexmo. If `applicationId` and `privateKey` are present, `apiSecret` is optional.\n* `applicationId` - (optional) The Nexmo Application ID to be used when creating JWTs.\n* `privateKey` - (optional) The Private Key to be used when creating JWTs. You can specify the key as any of the following:\n  * A [Buffer](https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_string_encoding) containing the file contents.\n  * A String containing the path to the key file on disk.\n* `signatureSecret` - (optional) API singature secret from Nexmo, used for signing SMS message requests\n* `signatureMethod` - (optional) singature method matching the one you gave Nexmo, used for signing SMS message requests. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\"\n* `options` - (optional) Additional options for the constructor.\n\nOptions are:\n\n```js\n{\n  // If true, log information to the console\n  debug: true|false,\n  // append info the the User-Agent sent to Nexmo\n  // e.g. pass 'my-app' for /nexmo-node/1.0.0/4.2.7/my-app\n  appendToUserAgent: string,\n  // Set a custom logger\n  logger: {\n    log: function() {level, args...}\n    info: function() {args...},\n    warn: function() {args...}\n  },\n  // Set a custom timeout for requests to Nexmo in milliseconds. Defaults to the standard for Node http requests, which is 120,000 ms.\n  timeout: integer,\n  // Set a custom host for requests instead of api.nexmo.com\n  apiHost: string,\n  // Set a custom host for requests instead of rest.nexmo.com\n  restHost: string\n}\n```\n\n## Callbacks\n\nAll methods expect a `callback` function to be passed in, with a method signature of `(error, response)` where:\n\n* `error` - is an Error object if the API call returns an error, or `null` if the API call was successful.\n* `response` - is an Object, with the API response if the API call was successful, or `null` if there was an error.\n\nExample:\n\n```js\ncallback = (error, response) => {\n  if (error) {\n    console.error(error)\n  }\n\n  if (response) {\n    console.log(response)\n  }\n}\n```\n\n## Messaging\n\n### Send a text message\n\n```js\nnexmo.message.sendSms(sender, recipient, message, options, callback);\n```\n\n* `options` - parameter is optional. See [SMS API Reference](https://developer.nexmo.com/api/sms#send-an-sms)\n\n### Send a Binary Message\n\n```js\nnexmo.message.sendBinaryMessage(fromnumber, tonumber, body, udh, callback);\n```\n\n* `body` - Hex encoded binary data\n* `udh` - Hex encoded udh\n\n### Send a WAP Push Message\n\n```js\nnexmo.message.sendWapPushMessage(fromnumber, tonumber, title, url, validity, callback);\n```\n\n* `validity` - is optional (if given should be in milliseconds)\n\n### Send a Short Code alert\n\n```js\nnexmo.message.shortcodeAlert(recipient, messageParams, opts, callback);\n```\n\n## Voice\n\nFor detailed information please see the documentation at https://developer.nexmo.com/api/voice\n\n### Make a call\n\nRequires `applicationId` and `privateKey` to be set on the constructor.\n\n```js\nnexmo.calls.create({\n  to: [{\n    type: 'phone',\n    number: TO_NUMBER\n  }],\n  from: {\n    type: 'phone',\n    number: FROM_NUMBER\n  },\n  answer_url: [ANSWER_URL]\n}, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#createCall\n\n### Get a Call\n\n```js\nnexmo.calls.get(callId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#getCall\n\n### Query Calls\n\n```\nnexmo.calls.get({status: 'completed'}, callback);\n```\n\nThe first parameter can contain many properties to filter the returned call or to page results. For more information see the [Calls API Reference](https://developer.nexmo.com/api/voice#getCalls).\n\n### Update a Call\n\n```js\nnexmo.calls.update(callId, { action: 'hangup' }, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#updateCall\n\n### Stream an Audio File to a Call\n\n```js\nnexmo.calls.stream.start(\n  callId,\n  {\n    stream_url: [\n      'https://nexmo-community.github.io/ncco-examples/assets/voice_api_audio_streaming.mp3'\n    ],\n    loop: 1\n  });\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startStream\n\n### Stop an audio stream in a call\n\n```js\nnexmo.calls.stream.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopStream\n\n### Play synthesized text in a call\n\n```js\nnexmo.calls.talk.start(\n  callId,\n  {\n    text: 'No songs detected',\n    voiceName: 'Emma',\n    loop: 1\n  }\n);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startTalk\n\n### Stop synthesized text in a call\n\n```js\nnexmo.calls.talk.stop(callId);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#stopTalk\n\n### Send DTMF to a Call\n\n```js\nnexmo.calls.dtmf.send(callId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/voice#startDTMF\n\n\n## Files\n\nFor detailed information please see the documentation at https://developer.nexmo.com/voice/voice-api/guides/recording\n\n### Get a file (recording)\n\n```js\nnexmo.files.get(fileIdOrUrl, callback);\n```\n\n### Save a file (recording)\n\n```js\nnexmo.files.save(fileIdOrUrl, file, callback);\n```\n\n## Verify\n\n### Submit a Verification Request\n\n```js\nnexmo.verify.request({number:<NUMBER_TO_BE_VERIFIED>,brand:<NAME_OF_THE_APP>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-request\n\n### Submit a PSD2 (Payment Services Directive 2) Verification Request\n\n```js\nnexmo.verify.psd2({number:<NUMBER_TO_BE_VERIFIED>,payee:<NAME_OF_THE_SELLER>,amount:<AMOUNT_IN_EUROS>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verifyRequestWithPSD2\n\n### Validate the response of a Verification Request\n\n```js\nnexmo.verify.check({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,code:<CODE_TO_CHECK>},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-check\n\n### Search one or more Verification Request\n\n```js\nnexmo.verify.search(<ONE_REQUEST_ID or ARRAY_OF_REQUEST_ID>,callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-search\n\n### Cancel verification\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'cancel'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n### Trigger next verification event\n\n```js\nnexmo.verify.control({request_id:<UNIQUE_ID_FROM_VERIFICATION_REQUEST>,cmd:'trigger_next_event'},callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/api/verify#verify-control\n\n## Number Insight\n\n### Basic\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-basic/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'basic', number: '1-234-567-8900'},  callback);\n```\n\n### Standard\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-standard/node\n\nExample:\n\n```js\nnexmo.numberInsight.get({level: 'standard', number: '1-234-567-8900'}, callback);\n```\n\n### Advanced\n\n```js\nnexmo.numberInsight.get({level: 'advancedSync', number: NUMBER}, callback);\n```\n\nFor more information check the documentation at https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced/node\n\n### Advanced Async\n\nNumber Insight Advanced might take a few seconds to return a result, therefore the option exists to process the result asynchronously through a webhook.\n\n```js\nnexmo.numberInsight.get({level: 'advancedAsync', number: NUMBER, callback: \"http://example.com\"}, callback);\n```\n\nIn this case, the result of your insight request is posted to the callback URL as a webhook. For more details on webhooks see the [Number Insight Advanced](https://developer.nexmo.com/number-insight/building-blocks/number-insight-advanced-async-callback/node) documentation.\n\n## Applications\n\nFor an overview of applications see https://developer.nexmo.com/concepts/guides/applications\n\n### Create an App\n\n```js\nnexmo.applications.create(params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#createApplication\n\n`params` can be\n\n``` json\n{\n\"name\": \"My Application\",\n  \"capabilities\": {\n    \"voice\": {\n      \"webhooks\": {\n        \"answer_url\": {\n          \"address\": \"https://example.com/webhooks/answer\",\n          \"http_method\": \"POST\"\n        },\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"messages\": {\n      \"webhooks\": {\n        \"inbound_url\": {\n          \"address\": \"https://example.com/webhooks/inbound\",\n          \"http_method\": \"POST\"\n        },\n        \"status_url\": {\n          \"address\": \"https://example.com/webhooks/status\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"rtc\": {\n      \"webhooks\": {\n        \"event_url\": {\n          \"address\": \"https://example.com/webhooks/event\",\n          \"http_method\": \"POST\"\n        }\n      }\n    },\n    \"vbc\": {}\n  }\n}\n```\n\n### Get a single App\n\n```js\nnexmo.applications.get(appId, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#getApplication\n\n - `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n### Get Apps by a filter\n\n```js\nnexmo.applications.get(options, callback, v2flag);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#listApplication\n- `options` - filter options, use `{}` to get all your applications\n- `v2flag` - if `true`, you'll receive the V2 API response, else you'll receive a V1 style response from the V2 API\n\n\n### Update an App\n\n```js\nnexmo.applications.update(appId, params, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#updateApplication\n\n### Delete an App\n\n```js\nnexmo.application.delete(appId, callback);\n```\n\nFor more information see https://developer.nexmo.com/api/application.v2#deleteApplication\n\n## Management\n\n### Check Account Balance\n\n```js\nnexmo.account.checkBalance(callback);\n```\n\n### List Account Secrets\n\n```js\nnexmo.account.listSecrets(apiKey, callback);\n```\n\n### Get Account Secret\n\n```js\nnexmo.account.getSecret(apiKey, secretId, callback);\n```\n\n### Create Account Secret\n\n```js\nnexmo.account.createSecret(apiKey, secret, callback);\n```\n\n### Delete Account Secret\n\n```js\nnexmo.account.deleteSecret(apiKey, secretId, callback);\n```\n\n### Get Pricing for sending a message to a country.\n\n```js\nnexmo.number.getPricing(countryCode, callback);\n```\n\n* `countryCode` - 2 letter ISO Country Code\n\n### Get Pricing for sending a message or making a call to a number.\n\n```js\nnexmo.number.getPhonePricing(product, msisdn, callback);\n```\n\n* `product` - either `voice` or `sms`\n* `msisdn` - Mobile Station International Subscriber Directory Number (MSISDN) is a number used to identify a mobile phone number internationally. i.e. 447700900000\n\n### Get all numbers associated with the account.\n\n```js\nnexmo.number.get(options, callback);\n```\n\n* `options` parameter is an optional Dictionary Object containing any of the following parameters\n  * `pattern`\n  * `search_pattern`\n  * `index`\n  * `size`\n  * `has_application`\n  * `application_id`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getOwnedNumbers)\n\nExample:\n\n```js\nnexmo.number.get({pattern:714,index:1,size:50,search_pattern:2}, callback);\n```\n\n### Search for MSISDN's available to purchase\n\n```js\nnexmo.number.search(countryCode,options,callback);\n```\n\n`options` parameter is optional. They can be one of the following :\n\n1. number pattern to match the search (eg. 1408)\n2. Dictionary Object optionally containing the following parameters :\n  * `pattern`\n  * `search_pattern`\n  * `type`\n  * `features`\n  * `index`\n  * `size`\n\nFor more details about these options, refer to the [Numbers API reference](https://developer.nexmo.com/api/numbers#getAvailableNumbers)\n\nExample:\n\n```js\nnexmo.number.search('US',{pattern:3049,index:1,size:50,type:'mobile-lvn',features:'VOICE',search_pattern:2}, callback);\n```\n\n### Purchase Number\n\n```js\nnexmo.number.buy(countryCode, msisdn, callback);\n\n// optional target_api_key option\nnexmo.number.buy(countryCode, msisdn, target_api_key, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#buyANumber).\n\n### Cancel Number\n\n```js\nnexmo.number.cancel(countryCode, msisdn, callback);\n\n// optional target_api_key option\nnexmo.number.cancel(countryCode, msisdn, target_api_key, callback);\n```\n\nFor more details on these parameters, see the [Numbers API reference](https://developer.nexmo.com/api/numbers#cancelANumber).\n\n### Update Number\n\n```js\nnexmo.number.update(countryCode, msisdn, params, callback);\n```\n\n`params` is a dictionary of parameters as described in the [Numbers API reference](https://developer.nexmo.com/api/numbers#updateANumber).\n\n### Update Password (API Secret)\n\n```js\nnexmo.account.updatePassword(<NEW_PASSWORD>,callback);\n```\n\n### Update Callback URL associated to the account\n\n```js\nnexmo.account.updateSMSCallback(<NEW_CALLBACK_URL>,callback);\n```\n\n### Change Delivery Receipt URL associated to the account\n\n```js\nnexmo.account.updateDeliveryReceiptCallback(<NEW_DR_CALLBACK_URL>,callback);\n```\n\n## Redact\n\n### Redact a specific ID\n\n```js\nnexmo.redact.transaction(id, type, callback);\n```\n\n## Pricing\n\n`type` is the type of service you wish to retrieve pricing for: either `sms`, `sms-transit` or `voice`.\n\n### Get pricing for a specific country\n\n```js\nnexmo.pricing.get(type, country_code, callback);\n```\n\n### Get pricing for all countries\n\n```js\nnexmo.pricing.getFull(type, callback);\n```\n\n### Get pricing for a specific dialing prefix\n\n```js\nnexmo.pricing.getPrefix(type, country_prefix, callback);\n```\n\n### Get pricing for a specific phone number\n\n```js\nnexmo.pricing.getPhone(type, phone, callback);\n```\n\n## Media\n\n### Upload a file\n\n```js\nnexmo.media.upload({\"file\": \"/path/to/file\"}, callback);\n```\n\n### Upload from a URL\n\n```js\nnexmo.media.upload({\"url\": \"https://example.com/ncco.json\"}, callback);\n```\n\n### Search existing media\n\n```js\n// See https://ea.developer.nexmo.com/api/media#search-media-files\n// for possible search parameters\nnexmo.media.search({ page_size: 1, page_index: 1 }, callback);\n```\n\n### Download media\n\n```js\nnexmo.media.download(id, callback);\n```\n\n### Delete media\n\n```js\nnexmo.media.delete(id, callback);\n```\n\n### Update media\n\n```js\nnexmo.media.update(id, body, callback);\n```\n\n### Get media details\n\n```js\nnexmo.media.get(id, callback);\n```\n\n## JWT\n\nThere are two ways of generating a JWT. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst jwt = Nexmo.generateJwt('path/to/private.key', {application_id: APP_ID});\n```\n\nOr via a `Nexmo` instance where your supplied `applicationId` and `privateKey` credentials will be used:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    applicationId: APP_ID,\n    privateKey: PRIVATE_KEY_PATH,\n  });\n\nconst jwt = nexmo.generateJwt();\n```\n\n## Signature\n\nThere are two ways of generating a signature hash. Both strip the `sig` parameter if supplied. You can use the function that exists on the Nexmo definition:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst hash = Nexmo.generateSignature(SIGNATURE_METHOD, SIGNATURE_SECRET, params);\n```\n\nOr via a `Nexmo` instance where your supplied `signatureSecret` and `signatureMethod`:\n\n```js\nconst Nexmo = require('nexmo');\n\nconst nexmo = new Nexmo({\n    apiKey: API_KEY,\n    apiSecret: API_SECRET,\n    signatureSecret: SIGNATURE_SECRET,\n    signatureMethod: SIGNATURE_METHOD,\n  });\n\nconst hash = nexmo.generateSignature();\n```\n\n`SIGNATURE_METHOD` is the signature method matching the one you gave Nexmo. Must be one of \"md5hash\", \"md5\", \"sha1\", \"sha256\", or \"sha512\".\n\n\n\n## Voice (Deprecated)\n\n### Send TTS Message\n\n```js\nnexmo.voice.sendTTSMessage(<TO_NUMBER>,message,options,callback);\n```\n\n### Send TTS Prompt With Capture\n\n```js\nnexmo.sendTTSPromptWithCapture(<TO_NUMBER>,message,<MAX_DIGITS>, <BYE_TEXT>,options,callback);\n```\n\n### Send TTS Prompt With Confirm\n\n```js\nnexmo.voice.sendTTSPromptWithConfirm(<TO_NUMBER>, message ,<MAX_DIGITS>,'<PIN_CODE>',<BYE_TEXT>,<FAILED_TEXT>,options,callback);\n```\n\n## Testing\n\nRun:\n\n```bash\nnpm test\n```\n\nOr to continually watch and run tests as you change the code:\n\n```bash\nnpm run-script test-watch\n```\n\n## Examples\n\nSee [examples/README.md](examples/README.md).\n\nAlso, see the [Nexmo Node Quickstarts repo](https://github.com/nexmo-community/nexmo-node-quickstart).\n\n## Creating your own requests\n\n> #### IMPORTANT\n> This section uses internal APIs and should not be relied on. We make no guarantees that the interface is stable. Relying on these methods is not recommended for production applications\n\nFor endpoints that are not yet implemented, you can use the Nexmo HTTP Client to\nmake requests with the correct authentication method.\n\nIn these examples, we assume that you've created a `nexmo` instance as follows:\n\n```javascript\nconst nexmo = new Nexmo({\n    apiKey: 'API_KEY',\n    apiSecret: 'API_SECRET',\n    applicationId: 'APPLICATION_ID',\n    privateKey: './private.key',\n});\n```\n\n* If your API endpoint is on `api.nexmo.com`, use the `nexmo.options.api` object.\n* If your API endpoint is on `rest.nexmo.com`, use the `nexmo.options.rest` object.\n\nBoth of these objects expose the following methods:\n\n* `get(path, params, callback, useJwt)` (`params` is the query string to use)\n* `post(path, params, callback, useJwt)` (`params` is the POST body to send)\n* `postUseQueryString(path, params, callback, useJwt)` (`params` is the query string to use)\n* `delete(path, callback, useJwt)`\n\nTo make a request to `api.nexmo.com/v1/calls?status=rejected`:\n\n```javascript\nnexmo.options.api.get(\n    \"/v1/calls\",\n    {\"status\": \"rejected\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    true // Use JWT for authentication\n);\n```\n\nTo make a request to `rest.nexmo.com/sms/json?from=Demo&to=447700900000&text=Testing`:\n\n```javascript\nnexmo.options.rest.postUseQueryString(\n    \"/sms/json\",\n    {\"from\": \"Demo\", \"to\": \"447700900000\", \"text\": \"Testing\"},\n    function(err, data){\n        console.log(err);\n        console.log(data);\n    },\n    false // Don't use JWT, fall back to API key/secret\n);\n```\n\n## API Coverage\n\n* Voice\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Update Calls\n  * [x] Stream to Call\n  * [x] Talk to Call\n  * [x] DTMF to Call\n* Messaging\n  * [x] Send\n  * [ ] Delivery Receipt Webhook\n  * [ ] Inbound Message Webhook\n  * [x] Search\n    * [x] Message\n    * [x] Messages\n    * [x] Rejections\n  * [x] US Short Codes\n    * [x] Two-Factor Authentication\n    * [x] Event-Based Alerts\n      * [x] Sending Alerts\n      * [x] Campaign Subscription Management\n* Number Insight\n  * [X] Basic\n  * [X] Standard\n  * [X] Advanced\n  * [X] Advanced Async\n  * [ ] Advanced Async Webhook\n* Verify\n  * [x] Verify\n  * [x] PSD2\n  * [x] Check\n  * [x] Search\n  * [x] Control\n* Applications\n  * [x] Create an Application\n  * [x] Get Applications\n  * [x] Update an Application\n  * [x] Delete an Application\n* Account\n  * [X] Balance\n  * [x] Pricing\n  * [x] Settings\n  * [x] Top Up\n  * [x] Numbers\n    * [x] Search\n    * [x] Buy\n    * [x] Cancel\n    * [x] Update\n* Media\n  * [x] Upload\n  * [x] Download\n  * [x] Search\n  * [x] Get\n  * [x] Update\n  * [x] Delete\n* Voice (Deprecated)\n  * [x] Outbound Calls\n  * [ ] Inbound Call Webhook\n  * [x] Text-To-Speech Call\n  * [x] Text-To-Speech Prompt\n* Redact\n  * [x] Transaction\n\n\n## License\n\nMIT - see [LICENSE](LICENSE.txt)\n","readmeFilename":"README.md","users":{"shide":true,"lucadev15":true,"chirag8642":true,"derickchou0129":true,"hendrik.bunnick":true}}