https://matrix.org/docs/guides/whatsapp-bridging-mautrix-whatsapp This app works best with JavaScript enabled. [matrix-log]DiscoverDevelopFoundationBlogFAQsMatrix LiveShopTry Now Try Now [basic_spre] Docs [basic_penc] Spec [basic_card] API Playground [basic_sett] Code Bridging Matrix with WhatsApp running on a VM Matrix is: an open standard for interoperable, decentralised, real-time communication. In this article we'll benefit from all three of these attributes: * interoperable: we'll see how Matrix can be made to interact with WhatsApp * decentralised: you can perform this on your own server while still enjoying the benefits of being connected to the rest of the Matrix federation * real-time communication: we'll see how to send and receive messages in real-time Install your homeserver and install mautrix-whatsapp, the WhatsApp bridge Firstly, you need to have a Matrix homeserver installed. If you don't currently have one, take a look at the instructions at Installing Synapse, and also in the Synapse README. Next, install mautrix-whatsapp by following the instructions at mautrix-whatsapp/wiki. If you are starting from scratch, I suggest you take a look at matrix-docker-ansible-deploy, as this project will enable you to deploy Synapse, mautrix-whatsapp and other components easily. For example, if you have an existing deployment using matrix-docker-ansible-deploy, you can add mautrix-whatsapp simply by adding the following line to your configuration file: matrix_mautrix_whatsapp_enabled: true ... and re-running the setup: ansible-playbook -i inventory/hosts setup.yml --tags=setup-all Either way, you will soon have a functioning Matrix Synapse homeserver and mautrix-whatsapp installed with it. Next, we will set up an Android VM. Set up an Android VM The best way to run an Android Virtual Machine is to use the Android Studio tools from Google. First, install Android Studio, making sure to follow the post-install steps, as they will install additional tools we need, including AVD Manager. Once installed, run AVD manager by choosing Tools -> AVD Manager from the menu. Follow the steps to create a new virtual machine, in this example I have a Nexus 5X running Android 9, but almost any configuration is fine here. Make sure that you give the device access to the Play Store. [avd] Install WhatsApp and sign-in Launch the Virtual Device, the open the Play Store and sign in. Now use the Play Store to install WhatsApp on the Virtual Device. You will be asked to verify your phone number, use your number on another device to complete this step. [nexus5] Setup mautrix-whatsapp bridge Now that you have WhatsApp working in a VM, and Matrix working on your server, it's time to bridge them togther! Per the instructions at mautrix-whatsapp/wiki, you must start a new chat with @whatsappbot:yourdomain>. Type login to begin the authentication process. mautrix-whatsapp operates by using the WhatsApp Web feature of WhatsApp - which means it uses a QR code that you must now scan on the device running WhatsApp - which in your case is the AVD. In order to scan the presented QR code, set your AVD camera to passthrough the camera device on your host machine - see the images below. [camera1] [camera2] Once this is complete, you can type sync, to start bridging contacts, and sync --create to automatically create room invites. And that's it! You may need to take a little time to watch the sync happen, particularly if you have a very large number of chats on the WhatsApp side, but there is no further configuration needed. Demo! Contents Install your homeserver and install mautrix-whatsapp, the WhatsApp bridge Set up an Android VM Install WhatsApp and sign-in Setup mautrix-whatsapp bridge Demo! --------------------------------------------------------------------- Other Guides Introduction Introduction How can I get involved? The Matrix Jobs Room Application Services Made for Matrix Badge Guidelines Moderation in Matrix Running online events with Open Source communication tools Server Setup Installing Synapse Free Small Matrix Server Encryption End-to-End Encryption implementation guide Implementing more advanced e2ee features, such as cross-signing Client-Server API Usage of the matrix-js-sdk Migrating from Client Server API v1 Client Server API Using Matrix to make Chatbot software from the 1960s available in 2018 Client Developers' Guide to Supporting SSO Creating a simple read-only Matrix client Usage of matrix-bot-sdk matrix-bot-sdk Room Admin Features Usage of matrix-nio (Python Matrix client library) Bridging Types of Bridging Bridging Matrix with WhatsApp running on a VM Homeserver Development State Resolution v2 for the Hopelessly Unmathematical DiscoverTry MatrixClientsBotsSDKsHosting GuidesGetting StartedClient-Server APIInstall SynapseBridgesAll guides Develop DocsSpecAPI PlaygroundCode BlogAll PostsThis Week In MatrixSecurityRSS MoreFAQsMatrix LiveSecurity Disclosure PolicyCode of Conduct for Matrix.orgLegalContactSite Source [github][gitlab][youtube][twitter] (c) 2020 The Matrix.org Foundation C.I.C. tracker