whatsapp-api icon indicating copy to clipboard operation
whatsapp-api copied to clipboard

Question: How to unload inactive WhatsApp clients without losing session data?

Open rgf2004 opened this issue 6 months ago • 3 comments

I'm building a website that uses the whatsapp-api to manage multiple accounts for different users. When a user becomes inactive (detected via WebSocket), I want to terminate their client/browser session to reduce resource usage, but without losing the authentication/session data, so that the client can be reinitialized when the user logs in again.

Is this possible with the current APIs? If not, what approach would you recommend?

rgf2004 avatar Jun 23 '25 20:06 rgf2004

At this moment, this is not implemented. Feel free to open PR.

avoylenko avatar Jun 26 '25 09:06 avoylenko

Just implemented this functionality in forked project. Feel free to switch https://github.com/avoylenko/wwebjs-api

avoylenko avatar Jul 11 '25 17:07 avoylenko

Thanks a lot! I tested it using the main branch, and it's working perfectly. Looking forward to the release of the official Docker image.

rgf2004 avatar Jul 14 '25 07:07 rgf2004