Skip to content

Instantly share code, notes, and snippets.

View imdkbj's full-sized avatar
🎯
Focusing

Deepak Bhardwaj imdkbj

🎯
Focusing
  • 06:59 (UTC +05:30)
View GitHub Profile
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const VERIFY_SERVICE_SID = process.env.VERIFY_SERVICE_SID;
const client = require('twilio')(accountSid, authToken);
const smsErrorHandler = (e) => {
console.log(e)
let { message, code, status } = e;
@imdkbj
imdkbj / setwebhook.js
Created January 27, 2020 16:01
Setup to listen telegram multiple bots on webhooks.
const axios = require('axios');
const apiurl = 'https://api.telegram.org/bot';
const serveraddress = 'https://yourdomain.com';
const tokens = ['3445345345:454545-iY_wE6wj_aKDJwKLXk', '453454545:gffgfgzbcfjhsdbflhjdsfvhjlvdsf'];
//set webhook
//you can make this as call as way you want.
webhookURL(tokens, 50, 8443, 'tgram');
async function webhookURL(bot_tokens, max_connections, port, from) {