gpt4 book ai didi

Azure函数应用程序读取O365组邮箱

转载 作者:行者123 更新时间:2023-12-04 10:52:21 25 4
gpt4 key购买 nike

是否可以访问 Outlook API 端点来读取组邮箱的收件箱?

{"error":{"code":"OAuthMissingForThisApiVersion","message":"Authentication for this API version requires OAuth."}}

如何传递此请求的 OAuth token ?

最佳答案

根据官方文档,您需要获取 token 并在请求中设置 Authorization header :

GET https://graph.microsoft.com/v1.0/me/mailfolders/inbox/messages?$select=subject,from,receivedDateTime&$top=25&$orderby=receivedDateTime%20DESC

Accept: application/json
Authorization: Bearer eyJ0eXAi...b66LoPVA
X-AnchorMailbox: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9af0fbe9f5f4daf9f5f4eef5e9f5b4f5f4f7f3f9e8f5e9f5fceeb4f9f5f7" rel="noreferrer noopener nofollow">[email protected]</a>

https://learn.microsoft.com/en-us/outlook/rest/get-started

关于Azure函数应用程序读取O365组邮箱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59420144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com