How to set label for Hangouts Meeting via API - google-api

Background
I'm trying to create an appointment calendar using GSuite and Google Calendar API. When a user (no Google account and outside the GSuite organization) creates an appointment, I'm trying to create a Calendar event on the Calendar of an organization member via the Google Calendar API and generate a Hangouts meeting link.
Problem
I can create the event and the Hangouts meeting link, but I cannot create a custom label for the video link. I was able to make it slightly unique by adding an attendee with a fake email xczczf#example.com to John Doe's calendar to get a label of doe-j-xcz, but I would like full control over the label if possible.
Attempted Solutions That Didn't Work
Create the event and provide a conferenceData.createRequest and an entryPoint with the desired label.
Create the event first and then send a patch with the information described in 1
Changing the conferenceId

After messing around with the API Explorer, a custom label can be made by:
Creating the Cal event and adding a meeting link using a createRequest
Send a Patch with conferenceData.conferenceId set to the unique label value

Related

Edit Google Calendar "From" and "Organizer"

I want to create event via google calendar api using Go. I found out that the sender (From) is whoever responsible in client_id I provide in the google API, in this case me. Can I edit this sender, so that it is not sent from me? At least I can edit the display name of the sender, the email I think will always be my email
Also about editing the organizer, I tried to use move action but it only moves the event, not change the organizer. Is there other way to edit organizer?
To address your questions:
1. Can I create an event from another address?
What you want can be done by creating a service account and performing domain-wide-delegation
What is a service account?
A service account is a special type of Google account intended to represent a non-human user that needs to authenticate and be authorized to access data in Google APIs - in your situation the Calendar API.
After creating the above mentioned service account, you will have to perform domain-wide-delegation and impersonate a user in your domain in order to be able to create the event wanted.
Now, when writing the code for your application, you will have the use the credentials that were created for this account in order to authorize the requests.
OR
If you want to specifically edit only the display name of the creator of the event, you can perform an update request:
PUT https://www.googleapis.com/calendar/v3/calendars/calendarId/events/eventId
And add in the request body this:
"creator": {
"displayName": "UPDATED DISPLAY NAME"
}
2. Can I edit the organizer?
According to the Calendar API Documentation:
organizer > The organizer of the event. If the organizer is also an attendee, this is indicated with a separate entry in attendees with the organizer field set to True. To change the organizer, use the move operation. Read-only, except when importing an event.
Therefore, the organizer can be changed/updated only when importing the event in question.
Reference
Authorizing Requests to the Google Calendar API
;
Creating A Service Account;
Calendar API Events Resource;
Calendar API Events:Update.

Outlook - Copy group calendar events to user outlook calendar

We have a recurring event setup in Office 365 group calendar. If a new member is added to this group, that member can see the event in "Group" calendar and in order to see this event in main calendar, user have to click on "Copy to My calendar" in group event.
Is there any way to do this via code/script? Basically achieve "Copy to My calendar" for Office 365 group calendar to User's main calendar via code.
I'm not sure when you click "Copy to my calendar" if it has some smart link or if it is just a copy at a point in time.
You could subscribe to the calendar using a webhook. That webhook would call your API hosted somewhere (an Azure Function, a web api hosted on Azure App Service). Your API would recieve the event id, it could then fetch the full details of the event and then create a new event on the users calendar.
I'm assuming that you'd want this to create it on all users calendar and also to update it if there were changes on the source event.
Its complex for sure doing it this way.
https://learn.microsoft.com/en-us/graph/webhooks
https://learn.microsoft.com/en-us/graph/api/resources/event?view=graph-rest-1.0

Programmatically adding attendees to calendar event on macOS

Our requirement was to add an invitee to an EKEvent.
As written in the Apple EventKit documentation it is not allowed to add meeting invitees programmatically since those properties of an EKEvent are read-only.
We tried another way to create an .ics file and add it the calendar programtically. But with this approach we are not able to create attendees to an event hosted in an Exchange account. Where as other accounts like GMail are working fine.

Google Calendar Resource: How to get calendar ID from event instance?

If you list Google Calendar events using this API or particular event using this API specifying Calendar Resource room ID instead of calendar ID, you get list of all events associated to that Calendar Resource.
If you then want to delete or modify that event using domain-wide delegation of authority you can get event owner form creator.email field.
The question is how to get calendar ID where the event is created to be able to delete or modify it?
Of course you can try to use creator's e-mail or primary for the calendar ID but this fails if the user created the event in any other than default calendar.

How to change the event organizer on google calendar when creating an event?

I'm using the Google Calendar Api to create events, I'm trying to pass the parameter organizer with the email of the person that I want to be the owner but it is not working and the organizer it is always the same creator.

Resources