Skip to content

Instantly share code, notes, and snippets.

Last active Nov 5, 2020
What would you like to do?
Concurrent WhatsApp Web across devices and windows


Watch the video version :

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.

Step 1 - Sync secrets.

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)
  • WASecretBundle
    • Run: localStorage.getItem("WASecretBundle")
    • Example: {"key":"<>","encKey":"<>","macKey":"<>"} (including the " at the start and the end)

For all other webrowsers, set the secrets with:

  • WABrowserId
    • Run: localStorage.setItem("WABrowserId",'"AAAAAAAAAAAAAAAAA=="') with your own secret
  • WASecretBundle
    • Run: localStorage.setItem("WASecretBundle",'{"key":"<>","encKey":"<>","macKey":"<>"}') with your own secret

Try to refresh. If it fails, WhatsApp-Web will not recognize and will show "How to connect to your phone..."

Step 2 - Ignore disconnects

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)  {
		enumerable: true, configurable: true,
				console.log("Setting up FN")
				_that_fn = fn
					(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((||"").toString().toLowerCase()))
							return _that_fn(a,b,c,d,e,f,g);
	this._this = new _ws_new(a,b,c,d,e,f);
	return this._this;

Step 3

Now, click "Choose here" in each WhatsApp-Web window until they are all open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment