简体   繁体   中英

Send Meeting URL using Google Meet API

I want to create Java Spring application using google meet api where I'll generate a meeting link using which two people could join. Basically, it's like creating an event for two attendees (user could be of any domain) and send them meeting link using which they can join at some scheduled time using google hangout.

I tried this example here: https://developers.google.com/calendar/v3/reference/events#resource

But I think this is not the right one since want to generate meeting invite link where two random users can join using a link and in their response there's a hangout link which can only be used by domain users.

Also, in this link , it is mentioned that we can generate meeting URLs with no API calls but then guests who aren't part of my domain won't be able to join and I wanted to have an independent meeting link.

Can someone please point me in the right direction?

There Is No SDK OR Direct API For Google Meet.

You could maybe create a Google Calendar Event and associate it with Google Meet (hangoutsMeet). https://developers.google.com/calendar/api/guides/create-events

As mentioned in following link you can create meeting, add attendees and get meeting link https://developers.google.com/calendar/api/guides/create-events#java

        Event event = new Event()
    .setSummary("Google I/O 2015")
    .setLocation("800 Howard St., San Francisco, CA 94103")
    .setDescription("A chance to hear more about Google's developer products.");
DateTime startDateTime = new DateTime("2015-05-28T09:00:00-07:00");
EventDateTime start = new EventDateTime()
    .setDateTime(startDateTime)
    .setTimeZone("America/Los_Angeles");
event.setStart(start);
DateTime endDateTime = new DateTime("2015-05-28T17:00:00-07:00");
EventDateTime end = new EventDateTime()
    .setDateTime(endDateTime)
    .setTimeZone("America/Los_Angeles");
event.setEnd(end);
String[] recurrence = new String[] {"RRULE:FREQ=DAILY;COUNT=2"};
event.setRecurrence(Arrays.asList(recurrence));
EventAttendee[] attendees = new EventAttendee[] {
    new EventAttendee().setEmail("lpage@example.com"),
    new EventAttendee().setEmail("sbrin@example.com"),
};
event.setAttendees(Arrays.asList(attendees));
EventReminder[] reminderOverrides = new EventReminder[] {
    new EventReminder().setMethod("email").setMinutes(24 * 60),
    new EventReminder().setMethod("popup").setMinutes(10),
};
Event.Reminders reminders = new Event.Reminders()
    .setUseDefault(false)
    .setOverrides(Arrays.asList(reminderOverrides));
event.setReminders(reminders);
String calendarId = "primary";
event = service.events().insert(calendarId, event).execute();
System.out.printf("Event created: %s\n", event.getHtmlLink());

As you see in snippet event.getHtmlLink() gives the meeting URL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM