BotDelive is a Push Notification and 2-factor authentication API service that works over the chat bots (Telegram and Messenger).
npm i botdelivejs --save
Let's initialize the library first. Don't forget to replace <YOUR_APP_ID>
and <YOUR_SECRET_KEY>
.
const botdeliveJS = require('botdelivejs');
const bdJS = new botdeliveJS({
appId: '<YOUR_APP_ID>',
secretKey: '<YOUR_SECRET_KEY>',
});
Verify the "Access Code":
bdJS.verify('<BOT_GENERATED_ACCESS_CODE>', function (err, data) {
if (err) {
return console.log(err);
}
return console.log(data);
});
Send 2-factor authentication request (long polling):
bdJS.auth('<USER_ID>', function (err, data) {
if (err) {
return console.log(err);
}
return console.log(data);
});
Send Push Notification request:
bdJS.verify('<USER_ID>', '<MESSAGE>', function (err, data) {
if (err) {
return console.log(err);
}
return console.log(data);
});
Complete documentation available at: https://botdelive.com/docs
Version | Tag | Published |
---|---|---|
1.0.7 | latest | 5yrs ago |