Skip to content

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

@zainreza

Description

@zainreza

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions