Watch the video version : https://www.youtube.com/watch?v=IzZmIpXgZzo
This guide will let you run multiple WhatsApp-Web instances. Please note:
- Send - every message send will happen as soon as possible
- Read - Your phone will sync with only 1 instance at a time, to get update, you need to trigger it. My choise is to query a message info (any message)
Note: This guide is for educational porpuses only!!! It might break anyday. Use cautionally.
We will setup a WhatsApp-Web connection in all places. Choose one instance and copy your secret keys.
Warning: This secrets gives full access to your account, only share it with poeple you trust!
Open console in your source browser and get those 2 secrets:
- WABrowserId
- Run:
localStorage.getItem("WABrowserId")
- Example:
"AAAAAAAAAAAAAAAAA=="
(including the"
at the start and the end)
- Run:
- WASecretBundle
- Run:
localStorage.getItem("WASecretBundle")
- Example:
{"key":"<>","encKey":"<>","macKey":"<>"}
(including the"
at the start and the end)
- Run:
For all other webrowsers, set the secrets with:
- WABrowserId
- Run:
localStorage.setItem("WABrowserId",'"AAAAAAAAAAAAAAAAA=="')
with your own secret
- Run:
- WASecretBundle
- Run:
localStorage.setItem("WASecretBundle",'{"key":"<>","encKey":"<>","macKey":"<>"}')
with your own secret
- Run:
Try to refresh. If it fails, WhatsApp-Web will not recognize and will show "How to connect to your phone..."
In each browser, run this script to ignore disconnect messages:
Note: It will loose effect every page refresh.
_ws = Object.getOwnPropertyDescriptor(WebSocket.prototype,"onmessage")
_ws_new = WebSocket
WebSocket = function (a,b,c,d,e,f) {
Object.defineProperty(_ws_new.prototype,"onmessage",
{
enumerable: true, configurable: true,
get:
_ws.get.bind(this._this),
set:
((fn)=>{
console.log("Setting up FN")
_that_fn = fn
_ws.set.bind(this._this)(
(function (a,b,c,d,e,f,g) {
console.log("[0_o] WS Incoming: ",a,b,c,d,e,f,g);
if (!/disconnect.+replaced/.test((a.data||"").toString().toLowerCase()))
return _that_fn(a,b,c,d,e,f,g);
else
console.log("Ignoring!!!!")
}).bind(this._this)
)
}).bind(this._this)
})
this._this = new _ws_new(a,b,c,d,e,f);
return this._this;
}
Now, click "Choose here" in each WhatsApp-Web window until they are all open.