我目前正試圖發送一個請求來使用Microsoft Graph API創建一個訂閱郵件,但得到一個錯誤405方法不允許。Microsoft Graph Subscriptions - 方法不允許
我想知道是否有人知道爲什麼會發生這種情況?
這裏是我發送請求:
POST https://graph.microsoft.com/beta/subscriptions
Content-type: application/json
Content-length: 208
{
"changeType": "Created",
"notificationUrl":"https://webhook.azurewebsites.net/api/send/myNotifyClient",
"clientState": "subscription-identifier",
"resource": "me/messages"
}
,然後這裏是迴應:
{
"error": {
"code": "MethodNotAllowed",
"message": "Method not allowed.",
"innerError": {
"request-id": "a61ece92-7b7f-4693-b047-80c419ebde23",
"date": "2016-01-06T11:13:02"
}
}
}
響應頭:
Access-Control-Allow-Origin → *
Allow → GET
Cache-Control → private
Content-Type → application/json
Date → Wed, 06 Jan 2016 11:13:02 GMT
Duration → 58.558
OutBoundDuration → 0
Server → Microsoft-IIS/8.5
Transfer-Encoding → chunked
X-Powered-By → ASP.NET
client-request-id → a61ece92-7b7f-4693-b047-80c419ebde23
request-id → a61ece92-7b7f-4693-b047-80c419ebde23
x-ms-ags-diagnostic → {"ServerInfo":{"DataCenter":"NorthEurope","Slice":"SliceB","ScaleUnit":"001","Host":"AGSFE_IN_4","ADSiteName":"DUB"}}
您能否分享爲您的請求返回的響應頭?我無法再現這種行爲。 –