可以通过API归档Gmail邮件吗? [英] Can Gmail messages be archived via the API?

查看:83
本文介绍了可以通过API归档Gmail邮件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用该API似乎无法归档邮件.在Web界面中存档涉及移动,而不是标记到所有邮件"的消息. API不仅没有列出所有邮件"标签,而且还缺少move.只有modify,这仅允许在邮件中添加或删除标签.这很奇怪,因为文档说可以"创建过滤器以自动标记,转发或存档邮件".另外,filters action API仅包含forwardaddLabelIdsremoveLabelIds.

It doesn't appear to be possible to archive mail using the API. Archiving in the web interface involves moving, rather than labeling a message to "All Mail". Not only is there no "All Mail" label listed by the API, but move is missing as well. There is only modify and this allows only adding or removing labels from a message. This is strange, because the docs say it's possible to "Create filters to automatically label, forward, or archive messages". Additionally, the filters action API includes only forward, addLabelIds and removeLabelIds.

还有什么我没看见的东西吗?

Is there something I'm not seeing, yet?

推荐答案

如果您查看文档

if you check the documentation filters it appears that you need to remove the label INBOX

action.removeLabelIds=['INBOX']

这篇关于可以通过API归档Gmail邮件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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