Closed borsatti2 closed 2 months ago
I left a new session for about 10 minutes with WEBJS - even after that when I get the latest QR (either /screenshot or /qr) - it worked perferctly, no issue. Are we talking about
Consider listening to session.status
webhook events - it sends "status": "SCAN_QR_CODE"
on each new QR code, so you can fetch a new one.
https://waha.devlike.pro/docs/how-to/webhooks/#sessionstatus
{
"event": "session.status",
"session": "test",
"me": null,
"payload": {
"name": "test",
"status": "SCAN_QR_CODE"
},
"engine": "WEBJS",
"environment": {
"version": "2024.5.2",
"engine": "WEBJS",
"tier": "PLUS",
"browser": "/usr/bin/google-chrome-stable"
}
}
If you wish - we can add "qr" base64 decoded payload inside it (I'd suggest using the endpoint after you get the event tho)
When starting a session, send 3 or 4 qr codes, if you do not authenticate, close the session. It would also work if you set a time to be authenticated, if you haven't authenticated within 2 minutes, close the session