Guest User

Untitled

a guest
Jan 17th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. label_id_one = 'INBOX'
  2. label_id_two = 'UNREAD'
  3. # Getting all the unread messages from Inbox
  4. unread_msgs = GMAIL.users().messages().list(userId='me', labelIds=[label_id_one, label_id_two]).execute()
  5.  
  6. {
  7. "emailAddress": "me@gmail.com",
  8. "messagesTotal": 66617,
  9. "threadsTotal": 14010,
  10. "historyId": "4618566"
  11. }
Add Comment
Please, Sign In to add comment