Headless WhatsApp on Linux in a VM to use Matrix bridge
Solution 1:
I'm facing a similar situation. I will try the following and let you know if that works:
Since the challenge is to scan the QR code you could try downloading it as an image through code and scan it with your phone. It has to be quick since the page resets the QR every minute I think. You can use FTP or SSH to open the image once it's downloaded.
I'm guessing you are using a disposable phone but that's the only way I can think of to get it setup without a GUI.