I want to create a Google Calendar and generate a Google Meet URL at the same time. (to set a parameter (conferenceDataVersion=1))

In order to generate a Google Meet URL while creating a Google Calendar, I want to use the TAdvGCalendar component in the TMS VCL Cloud Pack product to set a parameter (conferenceDataVersion=1) and apply (syntax A) to the request Json.

(Syntax A)
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
requestId: JksKJJSK1KJSK
}
},


AdvGCalendar: TAdvGCalendar;

https://www.googleapis.com/calendar/v3/calendars/primary/events?conferenceDataVersion=1

{
"subject":"test",
"description":"test",
"start": {
"dateTime": "2023-05-31T18:00:00",
"timeZone": "KST"
},
"end": {
"dateTime": "2023-05-31T20:00:00",
"timeZone": "KST"
},
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
requestId: JksKJJSK1KJSK
}
},
.....

With two modifications to CloudCustomGCalendar.pas, we were able to see the Google Meet URL.

unit CloudCustomGCalendar;
...
function TAdvCustomGCalendar.GetCalendarData(Item: TGCalendarItem): string;
...
result := result

  • ' "start": { ' + starttime + ' },' + #13#10

  • ' "end": { ' + endtime + ' },' + #13#10
    // We added the following parts

  • ' "conferenceData": { ' + #13#10 // (23.05.25) added kth..

  • ' "createRequest": { ' + #13#10

  • ' "conferenceSolutionKey": { ' + #13#10

  • ' "type": "hangoutsMeet" ' + #13#10

  • ' }, ' + #13#10

  • ' "requestId": "test" ' + #13#10

  • ' } ' + #13#10

  • ' }, ' + #13#10

  • ' "location": "' + JSONEscape(Item.Location) + '", ' + #13#10
    ...

procedure TAdvCustomGCalendar.Add(Item: TGCalendarItem);
...
// We've modified the following
if Item.SendNotifications then
url := url + '?sendNotifications=true&conferenceDataVersion=1'
else
url := url + '?sendNotifications=false&conferenceDataVersion=1';
...
strRes := UTF8ToString(CleanupJSON(resdat));
// I was able to find the google meet URL in the strRes.
...

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.