WhiskeySockets / Baileys

Lightweight full-featured typescript/javascript WhatsApp Web API
https://baileys.whiskeysockets.io/
MIT License
3.63k stars 1.23k forks source link

Can I save sessions using mongosee/mongodb? #826

Closed AKAZAMD closed 3 months ago

AKAZAMD commented 3 months ago

I want to save the session files in Mongodb to make it more practical and lighter, is that possible?

allburov commented 3 months ago

The usual answer "You have to implement it yourself" https://github.com/WhiskeySockets/Baileys/issues/182 :) Here's a good start where I started recently implementing it https://github.com/salman0ansari/whatsapp-api-nodejs/blob/main/src/api/helper/mongoAuthState.js

allburov commented 3 months ago

Bascily you need to implement an interface with few methods:

Riders004 commented 3 months ago

The usual answer "You have to implement it yourself" #182 :) Here's a good start where I started recently implementing it https://github.com/salman0ansari/whatsapp-api-nodejs/blob/main/src/api/helper/mongoAuthState.js

Give me an example

allburov commented 3 months ago

Give me an example

https://github.com/salman0ansari/whatsapp-api-nodejs/blob/main/src/api/helper/mongoAuthState.js

Araxeus commented 2 months ago

https://github.com/FantoX/Atlas-MD/blob/main/System/MongoAuth/MongoAuth.js