yakyak / hangupsjs

google hangouts client library for nodejs
226 stars 46 forks source link

How do I login w/ username password? #101

Closed ZenithRogue closed 6 years ago

ZenithRogue commented 6 years ago

I can't seem to understand how the email/password login works. A little help?

averissimo commented 6 years ago

Here is the coffescript code to do so

The description on how to get the authorization token has been improved and is working as of today with the code below

Client = require './client'
Q      = require 'q'

# callback to get promise for creds using stdin. this in turn
# means the user must fire up their browser and get the
# requested token.
creds = -> auth:Client.authStdin

client = new Client()

# set more verbose logging
client.loglevel 'debug'

# receive chat message events
client.on 'chat_message', (ev) ->
    console.log ev
ZenithRogue commented 6 years ago

How about with node.js? I have never used coffeescript

averissimo commented 6 years ago
  1. Go to coffeescript.org
  2. Click on try
  3. Paste the coffescript code there

On the right you get the javascript compiled and you can use that