Java Graph REST API[Mail]如何下载包含附件的email.eml

Java Graph REST API[Mail]如何下载包含附件的email.eml,java,email,microsoft-graph-api,outlook-restapi,microsoft-graph-mail,Java,Email,Microsoft Graph Api,Outlook Restapi,Microsoft Graph Mail,下面的代码是检索EML文件的调用,但我还需要检索其中的附件。 我怎么做 jsonAttach = (StringResponse) Unirest.get( String.format("https://graph.microsoft.com/v1.0/users/%s/messages/%s/$value", user_email,tempMailId))

下面的代码是检索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)

你试过这样做吗(获取{id}/attachments/{id}/$value)?成功了吗?是的,成功了,谢谢!!好极了,卡多。很高兴听到上述情况有所帮助。请随意向上投票或标记为已回答,以便对其他人有所帮助。