hangouts-bot
hangouts-bot copied to clipboard
Lots of errors
I create a test script, but keep getting errors while running it. I tried installing node-stringprep, but the result was the same:
$ node test.js
Cannot load StringPrep-0.7.0 bindings (using fallback). You may need to npm install node-stringprep
createCredentials() is deprecated, use tls.createSecureContext instead
XMPP authentication failure
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
What are you using to log in? It sounds like Gtalk is rejecting your credientials. Make sure you use the full email address.
I'm using my full email. Here's my code: test.js:
var fs = require('fs');
var path = require('path');
var hangoutsBot = require("hangouts-bot");
var credentials = JSON.parse(fs.readFileSync(path.join(__dirname, "credentials.json")));
var bot = new hangoutsBot(credentials.email, credentials.password);
bot.on('online', function() {
console.log('Online as '+credentials.email);
});
bot.on('message', function(from, message) {
console.log("Message from "+from+": "+message);
});
credentials.json:
{
"email":"***********@gmail.com",
"password":"*********"
}
XMPP authentication failure with an apps account on another domain.
Also had this problem
Enable the "less secure apps" in your acc config: https://www.google.com/settings/security/lesssecureapps
I think it can solve!