Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to send a Google hangouts chat message using node.js?

I'm looking for a way to send a message to the new Gmail chat window - Google Hangout apparently. I'm aware XMPP is supported for old-style chats, but is there an API to send anything using Google Hangouts from node.js?

like image 337
Fluffy Avatar asked Aug 01 '14 14:08

Fluffy


1 Answers

https://github.com/jaxbot/hangouts-bot

Install

npm install hangouts-bot

Code

var hangoutsBot = require("hangouts-bot");
var bot = new hangoutsBot("[email protected]", "password");

bot.on('online', function() {
    console.log('online');
});

bot.on('message', function(from, message) {
    console.log(from + ">> " + message);
});

Original source: hangouts-bot README

like image 52
delsanic Avatar answered Sep 21 '22 01:09

delsanic