I'm implementing a bot where I can read emails and I'm following the Gmail API. I can read all the labels and I have stored it in the list. I am not able to read the messages inside the label
credentials = get_credentials()
http = credentials.authorize(httplib2.Http())
service = discovery.build('gmail', 'v1', http=http)
results = service.users().labels().get('me',"INBOX").execute()
print (results.getName())
and I get an error -
results = service.users().labels().get('me',"INBOX").execute()
TypeError: method() takes exactly 1 argument (3 given)
The official api docs implementation get label is in java.
Can someone please tell me what I'm doing wrong?
SCOPES = 'https://www.googleapis.com/auth/gmail.readonly','https://mail.google.com/','https://www.googleapis.com/auth/gmail.modify','https://www.googleapis.com/auth/gmail.labels'