#how to auth with phone number instead of qr?
6 messages · Page 1 of 1 (latest)
let pairingCodeRequested = false;
client.on('qr', async (qr) => {
// NOTE: This event will not be fired if a session is specified.
qrcode.generate(qr, { small: true });
// paiuting code example
const pairingCodeEnabled = true;
if (pairingCodeEnabled && !pairingCodeRequested) {
const pairingCode = await client.requestPairingCode('yournumberherewithout+'); // enter the target phone number
console.log('Pairing code enabled, code: '+ pairingCode);
pairingCodeRequested = true;
}
});
use github:pedroslopez/whatsapp-web.js#webpack-exodus
you can look at the example here https://github.com/pedroslopez/whatsapp-web.js/blob/webpack-exodus/example.js
Hello, i am getting this error:
TypeError: client.requestPairingCode is not a function
at Client.<anonymous> (D:\whatsapp-client\whatsapp-client\controllers\whatsappClient.js:63:46)
You need to use exodus version of the lib
@past flicker , indian phone numbers are facing problem in connecting the whatsapp