microsoft graph POST API /me/event connection error

Neha Soni 0 Reputation points
2024-04-23T06:34:18.4866667+00:00

Hello,

I am getting conenction error while making post API call .

curl -X POST https://graph.microsoft.com/v1.0/me/events -H 'Host:graph.microsoft.com' -H 'Content-Type:application/json' -H 'Authorization: Bearer <token>' -H 'Content-Length:645' -H 'Prefer:outlook.timezone="Pacific Standard Time"' -d @post-body.txt

Below is the post-body.txt

{
  "subject": "test event created",
  "body": {
    "contentType": "HTML",
    "content": "testing"
  },
  "start": {
      "dateTime": "2024-04-22T12:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "end": {
      "dateTime": "2024-04-22T14:00:00",
      "timeZone": "Pacific Standard Time"
  },
  "location":{
      "displayName":"NY"
  },
  "attendees": [
    {
      "emailAddress": {
        "address":"aaa@abc.com",
        "name": "User Name"
      },
      "type": "required"
    }
  ],
  "allowNewTimeProposals": true,
  "transactionId":"7E163156-7762-4BEB-A1C6-729EA81755A7"
 
}

Error is as Below

curl: (56) Recv failure: Connection was reset

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,644 questions
0 comments No comments
{count} votes