lc-at / kyros

Python wrapper for WhatsApp Web API websocket communication (based on https://github.com/sigalor/whatsapp-web-reveng)
MIT License
107 stars 27 forks source link

How to save session to file and then use method restore_session #8

Closed ramonck closed 3 years ago

ramonck commented 3 years ago

Hi,

I was wondering how I can save the session after login to a file and then use the restore_session method.

Thanks.

lc-at commented 3 years ago

Save the session by using kyros_client.session.save_to_file(filename). To restore it, you can use restore_session method with a Session instance (which you can initiate from a file by using its from_file static method) as an argument.