New promise-based Kavenegar js client based on axios.
npm:
npm install kavenegarjs
You need to register here to get an api key.
import kavenegarjs from 'kavenegarjs'
const kavenegarApi = kavenegarjs.init({
apikey: /* YOUR_API_KEY */,
})
var kavenegarjs = require('kavenegarjs')
var kavenegarApi = kavenegarjs.init({
apikey: /* YOUR_API_KEY */,
})
The official documentation with the full list of methods can be found here.
-
VerifyLookup
Sending OTP for mobile authorization. more...
kavenegarApi .VerifyLookup({ receptor: '09361234567', token: '852596', token2: 'www.example.com/register', template: 'registerverify', type: 'sms', }) .then(res => { console.log(res.data) }) .catch(err => { console.error(err.response.data) }) /* console.log(res.data): { "return": { "status":200, "message":"تایید شد" }, "entries": { "messageid":8792343, "message": "ممنون از ثبت نام شما کد تایید عضویت : 852596", "status":5, "statustext":"ارسال به مخابرات", "sender":"10004346", "receptor":"09361234567", "date":1356619709, "cost":120 } } console.error(err.response.data) { return: { status: 424, message: 'الگوی مورد نظر پیدا نشد یا هنوز تائید نشده' }, entries: null } */
- 0.1.1
- Add Readme
- 0.1.0
- Initial Release
Distributed under the ISC license. See LICENSE
for more information.
All contributions are welcome and appreciated.
- Fork it (https://github.com/AhmadMaleki/kavenegarjs/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request