Closed ashishbudhraja closed 2 years ago
Bro, did you got some solution for this? @ashishbudhraja
@3009aksingh Unfortunately no
Even if you manage to make this work by returning the qrCode on the request, if the qrcode expires the user won't be able to login with whatsapp. I suggest you consider implementing a websocket solution with https://socket.io/ for example. This way if the qrcode expires you can broadcast a new message with the new code without having to reload the page and redo the request. Also you can build a static frontend for receiving this messages and generating the qrcode image on the client-side.
Do you have any live example for the same?
Unfortunately I don't have a live example, but you can easily build one following the socket.io get started guide (https://socket.io/get-started/). There are a lot of examples there you can check it out. You can also find a lot of videos on youtube explaining how to implement socket.io server/client.
Closed by inactivity
Hi, How to use it for multiple account on same server? Is there any solution?
Also Can anybody help me with the sample code for setting it on server for browser output i have tried many ways but it didn't work?
app.get('/myQR', (req, res) => { wbm.start({showBrowser: false, qrCodeData: false, session: true}).then(async () => { res.send(` <!DOCTYPE html>
})
I tried using express also but not working.