google-api-java-client
google-api-java-client copied to clipboard
Could not insert event with Bad request
I want to create Event in calendar with such code
Event event = new Event()
.setSummary("Vacation from app")
.setLocation("800 Howard St., San Francisco, CA 94103")
.setDescription("A chance to hear more about Google's developer products.");
DateTime startDateTime = new DateTime("2020-11-10T00:20:50.52Z");;
EventDateTime start = new EventDateTime()
.setDate(startDateTime)
.setTimeZone("Europe/Kiev");
event.setStart(start);
DateTime endDateTime = new DateTime("2020-11-10T23:20:50.52Z");
EventDateTime end = new EventDateTime()
.setDate(endDateTime)
.setTimeZone("Europe/Kiev");
event.setEndTimeUnspecified(true);
event.setEnd(end);
googleCalendar.events()
.insert(calendarId, event)
.execute();`
But receive a response
{ "code" : 400, "errors" : [ { "domain" : "global", "message" : "Bad Request", "reason" : "badRequest" } ], "message" : "Bad Request" }
From this message I really do not understand which data is bad...
great support.
3 years later and I'm facing the same error.
@dmytr0 I'm guessing you haven't found the reason for it
Closing this issue as we are unable to provide adequate customer support through this forum. If you feel there is a bug or a feature request associated with this ticket, please open a new issue. Otherwise, https://cloud.google.com/support is best able to provide timely answers to API-specific questions.