I'm attempting to use VBA to access the Google Calendar API V3. I can't figure out how to determine which calendar a new event should be written to by default. Is there no such thing as a default or primary calendar under V3 of the Google Calendar API?
Will the CalendarID for the default calendar always be the user's email address?
To answer your question, no, the email address is not the default CalendarID. You can user "primary" as the default CalendarID. If you want, you can get a list of all the user's Calendar ID's and even create/delete calendars. Check out https://developers.google.com/google-apps/calendar/v3/reference/calendarList
you can just use the string "primary" for the CalendarID property to get the default calendar
Related
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.
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
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.
I am using google-api-php-clientfor fetching and inserting Google Calendar events. Now I want to synchronize events on my system with events on Google Calendar.
I am wondering, if I add Event in Google Calendar, can it be automatically added in my system (maybe with some callback url) so I don't need to use CRON jobs to recheck events in Google Calendar in some time interval?
Thank you!
Google provides both iCal and XML output for viewing from external applications. This URL can be found by clicking on the drop down from your calendar name while logged in, selecting settings, and the calendar name. The private address row gives you both iCal and XML URLs.
Here are instructions for Outlook and iCal.
in my windows phone application
when i was try use Google Calendar API insert a CalendarList as Fllow link: https://developers.google.com/google-apps/calendar/v3/reference/calendarList/insert
about reqeust it was need a calendar id. when i insert some format string . it was tip some reaource can't be found.
how to define a google calendar id in my windows phone application? or
is there have some interface automatically generated?
any suggestion?
The Calendar ID refers to the particular calendar you are trying to access. For any primary calendar, it will be your email address. For secondary calendar, you can find the Calendar ID in the Calendar setting. Under Calendar details, you will see a the Calendar address where the Calendar ID is located.