You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: