Briuor / wbm

wbm is an unofficial API to send bulk messages in whatsapp.
MIT License
203 stars 64 forks source link

Seems like it does not work. #2

Closed pramod0 closed 4 years ago

pramod0 commented 4 years ago

I tried this with my electron-vue app. I see QR code in console log but my WhatsApp web can't scan it. Is there a specific way to make this work?

Screenshot 2020-03-18 at 2 53 30 AM
Briuor commented 4 years ago

Hi @pramod0, did you install wbm using npm or downloading the repository? I'm asking it because the version on github was not updated yet. Can you please check wbm version in your package.json?

pramod0 commented 4 years ago

Thanks for quick reply. I installed using npm. The version is "wbm": "^1.0.6"

Briuor commented 4 years ago

This is the correct version. It seems to be an error not handled, i'm gonna work on it, thank you for open this issue! Do your electron project is public?If so, can i use your project to reproduce the error?

pramod0 commented 4 years ago

I can give you access.

On Wed, Mar 18, 2020, 4:41 AM Bruno Lopes notifications@github.com wrote:

This is the correct version. It seems to be an error not handled, i'm gonna work on it, thank you for open this issue! Do your electron project is public?If so, can i use your project to reproduce the error?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Briuor/wbm/issues/2#issuecomment-600344286, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALT2X6DERLEG76K3MOH3MDRH77TNANCNFSM4LN3XL5Q .

Briuor commented 4 years ago

Original Whatsapp Web QR Code

Screenshot from 2020-03-20 18-36-35

QR Code generated on command line

Screenshot from 2020-03-20 18-38-13

QR Code generated on browser console

Screenshot from 2020-03-20 18-39-11

The problem

When it is displayed on browser console the color is inverted(what is white becomes black and vice-versa) and can't be scanned.

Solution

To solve your problem i've created a method that returns the whatsapp web QR Code data, so you can use this data to generate your own QR Code on browser(i found this library that do it for you https://davidshimjs.github.io/qrcodejs/)

First update wbm:

npm update wbm

So you can use like this:

wbm.start({ qrCodeData: true }).then(async qrCodeData => {
    console.log('QRCode data: ', qrCodeData); // use this data to generate your own qrcode
    // here you generate your own qrcode(you can use this https://davidshimjs.github.io/qrcodejs/)
    await wbm.waitQRCode(); // it's used to avoid qrcode errors
    await wbm.send(phones, message);
}).catch(err => console.log(err));
LuizTokuhara commented 3 years ago

I tried this with my electron-vue app. I see QR code in console log but my WhatsApp web can't scan it. Is there a specific way to make this work?

Screenshot 2020-03-18 at 2 53 30 AM

Hi, could you describe how you run wbm with electron?

Regards, Luiz

AdiletArykbaev commented 2 years ago

hello why on logs it seems like i was sended,but not come,how can i fixe it