yakyak / hangupsjs

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

Error: invalid_scope #64

Open Konstantinusz opened 7 years ago

Konstantinusz commented 7 years ago

I am prompted to follow the oauth2 authentication link in browser an then paste the authorization token. When I follow the link I get an error message from Google: "Error: invalid_scope"

Not authorized to request the scopes: [https://www.google.com/accounts/OAuthLogin]

client_id=936475272427.apps.googleusercontent.com
scope=https://www.google.com/accounts/OAuthLogin
redirect_uri=urn:ietf:wg:oauth:2.0:oob
response_type=code
Konstantinusz commented 7 years ago

Okay, problem solved:

One should log off from his Google account, and then follow this link in the browser (Chrome works, because must be inspected a cookie value):

https://accounts.google.com/o/oauth2/programmatic_auth?hl=en&scope=https%3A%2F%2Fwww.google.com%2Faccounts%2FOAuthLogin+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&client_id=936475272427.apps.googleusercontent.com&access_type=offline&delegated_client_id=183697946088-m3jnlsqshjhh5lbvg05k46q1k4qqtrgn.apps.googleusercontent.com&top_level_cookie=1

And then following the steps explained in this video: https://www.youtube.com/watch?v=hlDhp-eNLMU

Then simply pasting the token for the node app. Thats all.

Rudloff commented 6 years ago

I'm also getting the same invalid_scope error when opening the URL provided by hangupsjs 1.3.6.