是否可以访问Outlook API端点以读取组邮箱的收件箱?
{"error":{"code":"OAuthMissingForThisApiVersion","message":"Authentication for this API version requires OAuth."}}
如何为此请求传递 OAuth 令牌?
根据官方文档,您需要获取令牌并在请求中设置授权标头:
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: jason@contoso.onmicrosoft.com
https://learn.microsoft.com/en-us/outlook/rest/get-started