Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem if headless true by default. nothing is happened #14

Open
zainreza opened this issue Apr 10, 2023 · 0 comments
Open

Problem if headless true by default. nothing is happened #14

zainreza opened this issue Apr 10, 2023 · 0 comments

Comments

@zainreza
Copy link

i have installed package "message-web" and then create new node.js project and put this

const { default: MessagesClient } = require('messages-web')

const client = new MessagesClient()

client.on('qr-code', (base64Image) => {
// example code to save image
console.log("Fdsfds");
fs.writeFileSync('qr.jpg', base64Image.replace(/^data:image/png;base64,/, ""), { encoding: 'base64' })
// your code
})

client.on('authenticated', async (service) => {
const inbox = service.getInbox()
const credentials = await client.getCredentials()
fs.writeFileSync('credentials.json', JSON.stringify(credentials, null, '\t'))
await client.quit()
})

i have also created file "credentials.json" in root of project. and then if i run commaand "node message.js". as message.js is the file. nothing happend. can you please tell me where i get mistake?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant