可以通过API归档Gmail邮件吗? [英] Can Gmail messages be archived via the API?
问题描述
使用该API似乎无法归档邮件.在Web界面中存档涉及移动,而不是标记到所有邮件"的消息. API不仅没有列出所有邮件"标签,而且还缺少move
.只有modify
,这仅允许在邮件中添加或删除标签.这很奇怪,因为文档说可以"创建过滤器以自动标记,转发或存档邮件".另外,filters
action
API仅包含forward
,addLabelIds
和removeLabelIds
.
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屋!