如何使用Gmail API获取INBOX中的未读线程数? [英] How to get the number of unread threads in INBOX with Gmail API?

查看:48
本文介绍了如何使用Gmail API获取INBOX中的未读线程数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用列表线程方法:

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}

resultSizeEstimate与Gmail网络应用程序中我的收件箱旁边的数字不匹配.

The resultSizeEstimate does not match the number next to my inbox in Gmail web app.

还有另一种方法吗?

推荐答案

现在,Gmail API使用Labels.Get()方法为每个Label上的邮件和线程提供了总计和未读计数.看: https://developers.google.com/gmail/api/release-notes https://developers.google.com/gmail/api/v1/reference /users/labels

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

这篇关于如何使用Gmail API获取INBOX中的未读线程数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆