pranavms13 / whatsapp-node-api

A Simple NodeJS API Wrapper for WhatsApp
Other
475 stars 183 forks source link

QR code not working #11

Closed Guray00 closed 3 years ago

Guray00 commented 4 years ago

I don't know if i'm doing something wrong, but after asking for the qr code, i get the response and i save it as html file. Then i open with a browser it correctly shows the qr code, but whatsapp gives a error asking to check if the qr code is from web.whatsapp.com (doesn't recognize it). What should i do? I'm using an italian whatsapp account.

choyan commented 4 years ago

Remove session.json and last.qr and try again.

yoki128 commented 3 years ago

I have the same error. when trying to scan the qr it gives me an error "the code could not be scanned. Make sure you have web.whatsapp.com open and scan the code again"

llermaly commented 3 years ago

I have the same problem and tried to print the code in the console. On this case the account links but the library throws error :

image

p.s : using whatsapp-web.js directly works without problem

llermaly commented 3 years ago

solved updating whatsapp-web to the last version

yoki128 commented 3 years ago

I have the same problem and tried to print the code in the console. On this case the account links but the library throws error :

image

p.s : using whatsapp-web.js directly works without problem

how do you use whatsapp-web.js directly

llermaly commented 3 years ago

I have the same problem and tried to print the code in the console. On this case the account links but the library throws error : image p.s : using whatsapp-web.js directly works without problem

how do you use whatsapp-web.js directly

const { Client } = require('whatsapp-web.js');
const client = new Client();

client.on('qr', (qr) => {
    // Generate and scan this code with your phone
    console.log('QR RECEIVED', qr);
});

client.on('ready', () => {
    console.log('Client is ready!');
});

client.on('message', msg => {
    if (msg.body == '!ping') {
        msg.reply('pong');
    }
});

client.initialize();