Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- label_id_one = 'INBOX'
- label_id_two = 'UNREAD'
- # Getting all the unread messages from Inbox
- unread_msgs = GMAIL.users().messages().list(userId='me', labelIds=[label_id_one, label_id_two]).execute()
- {
- "emailAddress": "me@gmail.com",
- "messagesTotal": 66617,
- "threadsTotal": 14010,
- "historyId": "4618566"
- }
Add Comment
Please, Sign In to add comment