1

I am trying to login to gmail and read the inbox messages (Subject, content). I have basic code for that to login and read the messages. But I'm unable to do so. Reason for this is, I will have to use Oauth to authenticate orchange the settings in gmail as "Allow less secure apps to ON" (I tried and it's working) as suggested here. But i don't want to go with second option to change settings. How do i use Oauth/Oauth2 to login to gmail and read the inbox messages, subject and content (Python code) ?

Diesel Kumar
  • 215
  • 4
  • 11
  • 22
  • Google has a pretty good quick start guide for Python. What have you tried and what's not working? https://developers.google.com/gmail/api/quickstart/python – payne Aug 27 '17 at 14:26

1 Answers1

0

You may check this documentation which describes OAuth 2.0, when to use it, how to acquire client IDs, and how to use it with the Google APIs Client Library for Python. The oauth2client library is included with the Google APIs Client Library for Python. It handles all steps of the OAuth 2.0 protocol required for making API calls. It is available as a separate package if you only need an OAuth 2.0 library. The sections below describe important modules, classes, and functions of this library.

Check this Python Quickstart for Gmail API.

abielita
  • 13,147
  • 2
  • 17
  • 59