ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

oauth2.py issue getting gmail credentials #322

Closed dbl001 closed 7 years ago

dbl001 commented 7 years ago

IMAP is enabled in my gmail “Forwarding and POP/IMAP” tab in your Gmail Account Settings.

screen shot 2017-04-26 at 8 03 22 am

I followed the instructions here:

https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough

This link is broken:

http://code.google.com/p/google-mail-xoauth-tools/wiki/

screen shot 2017-04-26 at 8 04 34 am

Any ideas?

 python oauth2.py --generate_oauth2_token --client_id=364545978226.apps.googleusercontent.com --client_secret=zNrNsBzOOnQy8_O-8LkofeTR
To authorize token, visit this url and follow the directions:
  https://accounts.google.com/o/oauth2/auth?client_id=364545978226.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&scope=https%3A%2F%2Fmail.google.com%2F
Enter verification code: 

screen shot 2017-04-25 at 10 14 19 am

dbl001 commented 7 years ago

Resolved. In 'oauth2.py' I had to use the 'client_id' and 'client_secret' returned from Google's Gmail application access screen. screen shot 2017-04-26 at 8 44 42 am