Хорошо, только что вызвал пару 500 ошибок на вашем сервере, ухмыляется.Попытка добавить еще одно сообщение в качестве вложения к черновику.
Полезная нагрузка (тело) была
{
"@odata.type": "#Microsoft.OutlookServices.ItemAttachment"
IsInline: false
ContentType: "message\rfc822"
Name" "original message.eml"
Id" originalMessageId
}
Вот вся команда CURL
'https://outlook.office365.com/api/v2.0/me/messages/AAMkAGQyZTBkZjQ1LWQ3M2QtNDk2MS04MWI4LTJhNWY1MGRmYzkyNwBGAAAAAABPZeBlIKL6TJIRMaoqmdhGBwAP_JVVr_HSRLiiYMDstTKcAAAAAAEPAAAP_JVVr_HSRLiiYMDstTKcAAADdPhwAAA=/attachments'
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3436.0 Safari/537.36' -H 'Referer: https://localhost:3443/index.html?et=' -H 'Origin: https://localhost:3443' -H 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJnRDU5blJpQnpmbk5BVGloOFJhZ1l5M3pyZyJ9.eyJvaWQiOiI0NDQ1NGRkOC02ZDRmLTRlY2QtYTNkMi0yYmZlZjIyZTI3ZmIiLCJwdWlkIjoiMTAwMzdGRkVBQUQzNzhDMCIsInNtdHAiOiJhZG1pbkB0ZXN0aW5nbnoub25taWNyb3NvZnQuY29tIiwidXBuIjoiYWRtaW5AdGVzdGluZ256Lm9ubWljcm9zb2Z0LmNvbSIsInZlciI6IkV4Y2hhbmdlLkNhbGxiYWNrLlYyIiwiYXBwaWQiOiIwMDAwMDAwMi0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAiLCJkZXBsb3ltZW50aWQiOiJodHRwczovL291dGxvb2sub2ZmaWNlMzY1LmNvbS8iLCJ0aWQiOiI5MTI3MzU0YS1iMzczLTQyOTQtOTRmNy02YmFjNzliZjk0ZWYiLCJhY3IiOiIxIiwiYXBwaWRhY3IiOiIwIiwic2NwIjoiTWFpbC5SZWFkV3JpdGUgTWFpbC5TZW5kIENhbGVuZGFycy5SZWFkV3JpdGUgQ29udGFjdHMuUmVhZFdyaXRlIiwiaXNzIjoiaHR0cHM6Ly9vdXRsb29rLm9mZmljZTM2NS5jb20vIiwiYXVkIjoiaHR0cHM6Ly9vdXRsb29rLm9mZmljZTM2NS5jb20iLCJleHAiOjE1MjY4Nzg1MjEsIm5iZiI6MTUyNjg3NzYyMX0.hw7Vt6fvZNtpBMuvj0oikWGBRYL0AqhmZvMhJKPMoyIjXNrG0cXgDD74XcUtkGYl4hBM1IdHObXFeCazE7o2OYqzKAdBFznpJzYA-3svg0H8NjJuP1ZiObDYfsJiTySN9r7OpecImBnqp8KYxzSiDd6EUxlK3QvdUOW57bUCcZ3rRsgq4v5i5v7rV6Lz6WG-wkz_n7mbOlBuPlnjCQ0oGvYUhSYtabG6RLgVTC4Is6r6hSy0LdmmJ3030CYWQJS3Fc5amAWtV9y-6YgZesaZoJy1au1C2LcqSIjdxdQ_CSiU1bGt8Lwom5My5v5VXun-qfr8W7l5HFU2kSYjAjsCpg'
-H 'DNT: 1' -H 'content-type: application/json' --data-binary '{"@odata.type":"#Microsoft.OutlookServices.ItemAttachment","IsInline":false,"ContentType":"message\rfc822","Name":"original message","Id":"AAMkAGQyZTBkZjQ1LWQ3M2QtNDk2MS04MWI4LTJhNWY1MGRmYzkyNwBGAAAAAABPZeBlIKL6TJIRMaoqmdhGBwAP_JVVr_HSRLiiYMDstTKcAAAAAAEdAAAP_JVVr_HSRLiiYMDstTKcAAADdQAfAAA="}'
--compressed
и 500Ответ такой:
{
"error": {
"code": "ErrorInternalServerError",
"message": "An internal server error occurred. The operation failed."
}
}
Читал https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/message_post_attachments, но это мало помогает с этой проблемой.
Есть какие-нибудь подсказки?