I tried to use the list thread method:
GET https://www.googleapis.com/gmail/v1/users/{MyEmailAddress}/threads?labelIds=INBOX&labelIds=UNREAD&key={YOUR_API_KEY}
The resultSizeEstimate does not match the number next to my inbox in Gmail web app.
Is there another way?
The Gmail API now provides total and unread counts for messages and threads on each Label using the Labels.Get() method. See: https://developers.google.com/gmail/api/release-notes and https://developers.google.com/gmail/api/v1/reference/users/labels
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With