Wa-automate-nodejs: Feature request: get QR using Easy API

Created on 26 Aug 2020  Â·  12Comments  Â·  Source: open-wa/wa-automate-nodejs

It's very helpful if we can get QR code using "easy api".

PRIORITY

All 12 comments

How do you mean? It already asks you to scan the QR code

Sorry, I explain. At moment QR can be scanned only from the terminal. The request is for a API method to get base64 of the QR, so I can scan anywhere.

@silvaartur Try with --pop-up

Hi @smashah is it possible to run @open-wa with npx so Chrome is run on non-headless mode and so scan QR from Chrome itself? I've tried with --pop-up but seems to not to cause any effect... I'm new on @open-wa, maybe headless mode is hardcoded on?

P.S. Very good work with Easy-API and @open-wa of course!!!

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

Changelog

🚀 Release 2.0.6 (2020-08-27)

@nrs1022 @silvaartur sorry it's --popup not --pop-up

Thank you very much @smashah !!!

@github-actions run


âš¡ Release! âš¡

(async () => {
function exec(cmd) {
  console.log(execSync(cmd).toString());
}

// Config
const gitUserEmail = "github-actions[bot]@users.noreply.github.com";
const gitUserName = "github-actions[bot]";

exec(`echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc`);
exec(`git config --global user.email "${gitUserEmail}"`);
exec(`git config --global user.name "${gitUserName}"`);
exec(`npm i`);
exec(`npm run release-ci`);

//comment on the issue
var result = execSync(`npx auto-changelog -o ./tempchangelog.txt --commit-limit false --template ./compact-keepachangelog.hbs --stdout`).toString();

    await postComment(result);

//create changelog image
exec(`npm run release-image`);
exec(`git commit -a -m 'updated release-image'`);
exec(`git push --force`);
  })();

Changelog

🚀 Release 2.0.8 (2020-08-28)

  • Release 2.0.8 3a3504c
  • Feature: Get QR Code as png file via popup api on launch #747 4ceec04
  • Patched: Fixed waitForId delay, now able to send files to broadcasts #718 and #752 8924c08

@silvaartur @nrs1022

In the upcoming update, you'll be able to GET the QR Code PNG file when using --popup.

If you want to set it on a specific port, use --popup-port.

By default, the popup is on port 3000. So you can get the QR code using:

http://localhost:3000/qr

It won't automatically update like the base popup path but you can keep refreshing it to get the latest QR code.

@silvaartur @nrs1022 in 2.0.17 both popup and API are now on the same port. --popup-port is now deprecated. As soon as the initialization process is complete, the popup endpoints will stop working entirely

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yoavmmn picture yoavmmn  Â·  5Comments

DeLuca92 picture DeLuca92  Â·  5Comments

alishahlakhani picture alishahlakhani  Â·  4Comments

mrbarnk picture mrbarnk  Â·  5Comments

sandro-salles picture sandro-salles  Â·  4Comments