whatsapp-web.js icon indicating copy to clipboard operation
whatsapp-web.js copied to clipboard

Use phone number instead of scan qr code

Open Julie4ganesh opened this issue 3 years ago • 6 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe.

every time I scanned the Qr code and use the bot... But this is sometimes not correctly working.

Describe the solution you'd like.

Once I give the phone number manually, the bot will assign the phone number without scan the qr code

Describe an alternate solution.

Once give the phone number manually/ dynamically, the bot will assign the phone number without scan the qr code

Additional context

No response

Julie4ganesh avatar Nov 10 '22 07:11 Julie4ganesh

how would you login only with the number? what would happen if you put another person's number?

iFraan avatar Nov 10 '22 13:11 iFraan

You can't. It's as simple as that. This just runs WhatsApp Web headless, so it can only use a QR code to log in.

imaperson1060 avatar Nov 11 '22 02:11 imaperson1060

You can save the session for each number after reading the QR-Code for the first time, then write a code that uses the session for the number that you specify.

lfdelphino avatar Nov 12 '22 20:11 lfdelphino

You can save the session for each number after reading the QR-Code for the first time, then write a code that uses the session for the number that you specify.

Do you know how to save it?

alvaro2203 avatar Dec 16 '22 14:12 alvaro2203

const client = new Client({ authStrategy: new LocalAuth({clientId:"NAME_SESSION"}) });

After synchronizing the qrcode session don't forget to assign the same name as the session(code).

brunoloopes avatar Jan 20 '23 21:01 brunoloopes

#2363

alechkos avatar Aug 08 '23 02:08 alechkos