图形REST API[Mail]如何下载带有附件的email.eml



下面的代码是我检索EML文件的调用,但我还需要检索其中的附件。我该怎么做?

jsonAttach = (StringResponse) Unirest.get(
String.format("https://graph.microsoft.com/v1.0/users/%s/messages/%s/$value", 
user_email,tempMailId))
.header("Accept", "application/json")
.header("Authorization", tokenType + " " + accessToken)
.asString();

这是文档。

我尝试了以下API调用,它对我有效

GET graph.microsoft.com/v1.0/me/messages{id}/attachments/{id}/$value)

最新更新