创建草稿回复消息,提供有效负载时出错
问题描述:
我正在通过Postman访问Outlook Office 365 API。我试着用这个URL来创建回复草稿消息:创建草稿回复消息,提供有效负载时出错
POST https://outlook.office.com/api/v2.0/me/messages/{message_id}/createreply
体包含:
body: {
"Comment": "Sounds great! See you tomorrow."
}
,但我得到了以下错误:
{
"error": {
"code": "RequestBodyRead",
"message": "The parameter 'Comment' in the request payload is not a valid parameter for the operation 'CreateReply'."
}
}
我已经使用这个请致电documentation。
此问题也适用于创建草稿答复所有邮件并创建草稿转发邮件。
答
这是因为你把comment
放在body
之内,它应该站在它自己的。从这个documentation:
POST https://outlook.office.com/api/beta/me/messages/AAMkADA1MTAAAAqldOAAA=/createreply
Content-Type: application/json
{
"Comment": "Fanny, Randi, would you name the group if the project is approved, please?"
}
请注意,这是{"comment": "string"}
,而不是body:{"comment": "string"}
。