restgoogle-apigoogle-calendar-apigoogle-meet

How to add Google Meet Links to Events using Calendar APIs


I am trying to add a Google Meet link to an event I created using Google Calendar APIs. I have used the OAuth 2.0 Playground to send requests, and while the request is successfully executed, there is no Google Meet link created for that event.

Request URI:

https://www.googleapis.com/calendar/v3/calendars/{calendarId}/events

Payload:

{
  "start": {
      "dateTime": "2024-02-22T10:00:00+00:00",
      "timeZone": "UTC"
   },
   "end": {
       "dateTime": "2024-02-22T12:00:00+00:00",
       "timeZone": "UTC"
   },
   "summary": "Code Review",
   "conferenceData": {
       "createRequest": {
            "requestId": "sofhoi4oin",
            "conferenceSolutionKey": {
               "type": "hangoutsMeet"
             }
         }
   }
}

After successfully executing the request, the event is created, but there is no Google Meet link associated with it. I expected the conferenceData section in the payload to generate a Google Meet link for the event. How can I fix the payload to generate a Google meet link for the event I generated?


Solution

  • Answer:

    As per documentation, you need to set conferenceDataVersion to 1 to allow creation of new conference data using the createRequest field as shown here:

    image

    Using your payload sample, it generated a 200 response code.

    image

    Reference:

    https://developers.google.com/calendar/api/v3/reference/events/insert