[英]Microsoft Graph API to access all email folders
Right now I use V1 of Microsoft rest api现在我使用Microsoft rest api的 V1
GET https://outlook.office.com/api/v1.0/me/MailFolders/INBOX/messages
GET https://outlook.office.com/api/v1.0/me/MailFolders/SentItems/messages
If I wanted to get all messages in all folders, is there a way to do it in V1 of the REST API ?如果我想获取所有文件夹中的所有消息,有没有办法在 REST API 的 V1 中做到这一点?
Thanks.谢谢。
With outlook mail rest api v1.0 , there is no direct way to get all messages in all folders , you could write your logic to loop the folders and get mails .使用 Outlook mail rest api v1.0,没有直接的方法来获取所有文件夹中的所有邮件,您可以编写逻辑来循环文件夹并获取邮件。 But in v2.0 ,you could use below api to get a message collection from the entire mailbox of the signed-in user (including the Deleted Items and Clutter folders):
但在 v2.0 中,您可以使用以下 api 从登录用户的整个邮箱(包括 Deleted Items 和 Clutter 文件夹)获取消息集合:
GET https://outlook.office.com/api/v2.0/me/messages
Please refer to this document for more details.有关详细信息,请参阅此文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.